2
0
Fork 0
mirror of git://git.savannah.gnu.org/guix/data-service.git synced 2023-12-14 03:23:03 +01:00

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:
Christopher Baines 2020-03-25 20:47:53 +00:00
parent 0c4e6a2fe4
commit d0eff9da5d
2 changed files with 2 additions and 0 deletions

View file

@ -16,6 +16,7 @@ renice 19 -p $$ || true
ionice -p $$ -c 3 || true
pg_dump --format=custom --compress=9 --serializable-deferrable \
--no-comments \
--username=guix_data_service \
--file="$TEMPORARY_FILE_NAME" \
"$DATABASE_NAME"

View file

@ -289,6 +289,7 @@ TEMPORARY_FILE_NAME="${TMPDIR:-/tmp}/guix_data_service_small-$DATE.dump.tmp"
pg_dump --username=guix_data_service \
--format=custom --compress=9 --serializable-deferrable \
--no-comments \
--username=guix_data_service \
--file="$TEMPORARY_FILE_NAME" \
"$URI_FOR_DATABASE"