guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: Use the --no-comments option to pg_dump


From: Christopher Baines
Subject: 02/02: Use the --no-comments option to pg_dump
Date: Wed, 25 Mar 2020 16:49:22 -0400 (EDT)

cbaines pushed a commit to branch master
in repository data-service.

commit d0eff9da5d0c286fc387dc3e11fba0d3cc81561f
Author: Christopher Baines <address@hidden>
AuthorDate: Wed Mar 25 20:47:53 2020 +0000

    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';
---
 scripts/guix-data-service-backup-database     | 1 +
 scripts/guix-data-service-create-small-backup | 1 +
 2 files changed, 2 insertions(+)

diff --git a/scripts/guix-data-service-backup-database 
b/scripts/guix-data-service-backup-database
index 3988a49..77fda89 100755
--- a/scripts/guix-data-service-backup-database
+++ b/scripts/guix-data-service-backup-database
@@ -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"
diff --git a/scripts/guix-data-service-create-small-backup 
b/scripts/guix-data-service-create-small-backup
index 57ee5ef..562735f 100755
--- a/scripts/guix-data-service-create-small-backup
+++ b/scripts/guix-data-service-create-small-backup
@@ -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"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]