Use the --no-comments option to pg_dump
Hopefully this will help with the pg_restore in the create-small-backup
script:
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2875; 0 0 COMMENT EXTENSION plpgsql
pg_restore: [archiver (db)] could not execute query: ERROR: must be owner of extension plpgsql
Command was: COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
This commit is contained in:
parent
0c4e6a2fe4
commit
d0eff9da5d
2 changed files with 2 additions and 0 deletions
|
|
@ -16,6 +16,7 @@ renice 19 -p $$ || true
|
||||||
ionice -p $$ -c 3 || true
|
ionice -p $$ -c 3 || true
|
||||||
|
|
||||||
pg_dump --format=custom --compress=9 --serializable-deferrable \
|
pg_dump --format=custom --compress=9 --serializable-deferrable \
|
||||||
|
--no-comments \
|
||||||
--username=guix_data_service \
|
--username=guix_data_service \
|
||||||
--file="$TEMPORARY_FILE_NAME" \
|
--file="$TEMPORARY_FILE_NAME" \
|
||||||
"$DATABASE_NAME"
|
"$DATABASE_NAME"
|
||||||
|
|
|
||||||
|
|
@ -289,6 +289,7 @@ TEMPORARY_FILE_NAME="${TMPDIR:-/tmp}/guix_data_service_small-$DATE.dump.tmp"
|
||||||
|
|
||||||
pg_dump --username=guix_data_service \
|
pg_dump --username=guix_data_service \
|
||||||
--format=custom --compress=9 --serializable-deferrable \
|
--format=custom --compress=9 --serializable-deferrable \
|
||||||
|
--no-comments \
|
||||||
--username=guix_data_service \
|
--username=guix_data_service \
|
||||||
--file="$TEMPORARY_FILE_NAME" \
|
--file="$TEMPORARY_FILE_NAME" \
|
||||||
"$URI_FOR_DATABASE"
|
"$URI_FOR_DATABASE"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue