]> granicus.if.org Git - postgresql/commit
Fix pg_dumpall to work for databases flagged as read-only.
authorKevin Grittner <kgrittn@postgresql.org>
Sat, 30 Nov 2013 18:06:48 +0000 (12:06 -0600)
committerKevin Grittner <kgrittn@postgresql.org>
Sat, 30 Nov 2013 18:06:48 +0000 (12:06 -0600)
commit4bdccd8427718f9c468e5e03286252f37ea771b5
tree89c2126765c214ab880bb40d09d43aabe09adb9e
parent9f1e051adefb2f29e757cf426b03db20d3f8a26d
Fix pg_dumpall to work for databases flagged as read-only.

pg_dumpall's charter is to be able to recreate a database cluster's
contents in a virgin installation, but it was failing to honor that
contract if the cluster had any ALTER DATABASE SET
default_transaction_read_only settings.  By including a SET command
for the connection for each connection opened by pg_dumpall output,
errors are avoided and the source cluster is successfully
recreated.

There was discussion of whether to also set this for the connection
applying pg_dump output, but it was felt that it was both less
appropriate in that context, and far easier to work around.

Backpatch to all supported branches.
src/bin/pg_dump/pg_dumpall.c