Today I Learned

2022/06/01

postgres sh shell pg_dump

That pg_dumpall exists. That you need to use pg_dumpall to dump tablespaces, roles, and subscriptions. That pg_dumpall will dump the postgres role by default, causing resultant dump to fail to restore. Fortunately, I’m able to grep -ve '^CREATE ROLE postgres