timescaledb/test/sql/utils/pg_dump_unprivileged.sh
Bharathy c06b647680 pg_dump on PG15 does not log messages with log level set to PG_LOG_INFO.
Version 15 pg_dump program does not log any messages with log level <
PG_LOG_WARNING to stdout. Whereas this check is not present in version
14, thus we see corresponding tests fail with missing log information.
This patch fixes by supressing those log information, so that the tests
pass on all versions of postgresql.

Fixes #4832
2022-11-01 20:13:17 +05:30

11 lines
376 B
Bash
Executable File

export PGOPTIONS
PGOPTIONS='--client-min-messages=warning'
# PG12 changed client logging so NOTICE messages are now warning.
# We adopt this also for older PG versions to make tests compatible.
${PG_BINDIR}/pg_dump -h ${PGHOST} -U dump_unprivileged dump_unprivileged > /dev/null 2>&1 | sed 's/NOTICE/warning/g'
if [ $? -eq 0 ]; then
echo "Database dumped successfully"
fi