pgsql: Don't emit garbage "\[un]restrict (null)" commands in pg_dump. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Don't emit garbage "\[un]restrict (null)" commands in pg_dump.
Date
Msg-id E1xAVhZ-00000001N3B-3Eq7@gemulon.postgresql.org
Whole thread
List pgsql-committers
Don't emit garbage "\[un]restrict (null)" commands in pg_dump.

_reconnectToDB() failed to consider the possibility that it could
be called without any restrict_key set.  This is reachable while
generating the "restore.sql" file in tar dump mode, which nobody
noticed because that file is mostly unused (and nothing really
bad happens anyway unless you specified --inserts mode).  But
I wonder if there are other code paths that reach the issue.

Bug: #19718
Reported-by: Pavel Kopylov <pkopylov@cloudlinux.com>
Author: Pavel Kopylov <pkopylov@cloudlinux.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/19718-7e945d0ff9b5a589@postgresql.org
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c5fcb19d04981f0f3ba420ce1696b5764d9a0e42

Modified Files
--------------
src/bin/pg_dump/pg_backup_archiver.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)


pgsql-committers by date:

Previous
From: Etsuro Fujita
Date:
Subject: pgsql: postgres_fdw: Improve comment in fetch_remote_statistics().