Make pg_dump error cleanly with -j against hot standby

Magnus Hagander <magnus@hagander.net>

Commit: 47e59697679a0877e0525c565b1be437487604a7
Author: Magnus Hagander <magnus@hagander.net>
Date: 2016-05-26T20:18:04Z
Releases: 9.5.4
Make pg_dump error cleanly with -j against hot standby

Getting a synchronized snapshot is not supported on a hot standby node,
and is by default taken when using -j with multiple sessions. Trying to
do so still failed, but with a server error that would also go in the
log. Instead, proprely detect this case and give a better error message.

Files

PathChange+/−
src/bin/pg_dump/pg_backup_db.c modified +38 −0
src/bin/pg_dump/pg_backup_db.h modified +1 −0
src/bin/pg_dump/pg_backup.h modified +1 −0
src/bin/pg_dump/pg_dump.c modified +13 −40