From: Eric Bollengier Date: Tue, 9 Jul 2024 10:10:43 +0000 (+0200) Subject: Fix #11009 About issue when migrating community catalog 9.4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;p=thirdparty%2Fbacula.git Fix #11009 About issue when migrating community catalog 9.4 Some SQL output is corrupting the CSV generation. Adding -q to the psql command line should avoid to print them. --- diff --git a/bacula/src/cats/update_postgresql_tables.in b/bacula/src/cats/update_postgresql_tables.in index af021a5847..23a1fb5f38 100644 --- a/bacula/src/cats/update_postgresql_tables.in +++ b/bacula/src/cats/update_postgresql_tables.in @@ -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" - 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"