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"