pg_dump, pg_upgrade: allow postgres/template1 tablespace moves
authorBruce Momjian <[email protected]>
Fri, 11 Sep 2015 19:51:10 +0000 (15:51 -0400)
committerBruce Momjian <[email protected]>
Fri, 11 Sep 2015 19:51:10 +0000 (15:51 -0400)
commitca445043e78ef7b2bbb911739f60b7a4726702b1
tree24148d6f606251098569e71de2d58f735de97dee
parenta7516bbc49f0d55e3ca24f294ae3df2b91838720
pg_dump, pg_upgrade:  allow postgres/template1 tablespace moves

Modify pg_dump to restore postgres/template1 databases to non-default
tablespaces by switching out of the database to be moved, then switching
back.

Also, to fix potentially cases where the old/new tablespaces might not
match, fix pg_upgrade to process new/old tablespaces separately in all
cases.

Report by Marti Raudsepp

Patch by Marti Raudsepp, me

Backpatch through 9.0
contrib/pg_upgrade/info.c
src/bin/pg_dump/pg_dumpall.c