I recently had a large postgresql database dump that was too big to load in one go. I’ve had this problem before and have written a similar bit of perl in the past to split the dumpall output into smaller (per database) pieces. I couldn’t find the last program, so this time I’ve put it in github … hope fully now I won’t lose it again.
It needs perl 5.6 or later to run