]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Fix #11009 About issue when migrating community catalog 9.4 Branch-15.0
authorEric Bollengier <eric@baculasystems.com>
Tue, 9 Jul 2024 10:10:43 +0000 (12:10 +0200)
committerEric Bollengier <eric@baculasystems.com>
Wed, 5 Aug 2026 07:42:33 +0000 (09:42 +0200)
Some SQL output is corrupting the CSV generation. Adding -q to the psql command line
should avoid to print them.

bacula/src/cats/update_postgresql_tables.in

index af021a5847515a1c448138c73ccc60e7715169ef..23a1fb5f38070cb77410bf8d7d222fe0b6c06519 100644 (file)
@@ -186,7 +186,7 @@ if [ "$DBVERSION" -eq 15 -o "$DBVERSION" -eq 16 ]; then
     echo " doesn't have write permission on the current directory,"
     echo " or if the system doesn't have enough space to store a"
     echo " compressed export of the File table"
     echo " doesn't have write permission on the current directory,"
     echo " or if the system doesn't have enough space to store a"
     echo " compressed export of the File table"
-    psql --set ON_ERROR_STOP=1 -d ${db_name} $* -c "set work_mem='$WORKMEM';"'set enable_mergejoin to off ; set enable_hashjoin to off; copy (SELECT FileId, FileIndex, JobId, PathId, Filename.Name, DeltaSeq, MarkId, LStat, Md5 FROM File JOIN Filename USING (FilenameId)) TO STDOUT' | $COMP -1 -c > file1017.data
+    psql -q --set ON_ERROR_STOP=1 -d ${db_name} $* -c "set work_mem='$WORKMEM';"'set enable_mergejoin to off ; set enable_hashjoin to off; copy (SELECT FileId, FileIndex, JobId, PathId, Filename.Name, DeltaSeq, MarkId, LStat, Md5 FROM File JOIN Filename USING (FilenameId)) TO STDOUT' | $COMP -1 -c > file1017.data
     
     if [ $? -ne 0 ]; then
        echo "Error while dumping file table to $PWD/file1017.data"
     
     if [ $? -ne 0 ]; then
        echo "Error while dumping file table to $PWD/file1017.data"