pg_dump, pg_upgrade: allow postgres/template1 tablespace moves

Bruce Momjian <bruce@momjian.us>

Commit: 52b07779ddd07d5cbe4b833c91061bb8ca9379aa
Author: Bruce Momjian <bruce@momjian.us>
Date: 2015-09-11T19:51:10Z
Releases: 9.0.23
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

Files

PathChange+/−
contrib/pg_upgrade/info.c modified +22 −5
src/bin/pg_dump/pg_dumpall.c modified +22 −0