From ccbb021f50790b1a824b46bd225349e98c84e7d3 Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Thu, 19 Aug 2021 23:44:11 +0200 Subject: [PATCH] tolere erreurs de pg_restore (cf https://www.postgresql.org/message-id/20849.1541638465%40sss.pgh.pa.us) --- tools/restore_scodoc7_data.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/restore_scodoc7_data.sh b/tools/restore_scodoc7_data.sh index b6b57cb5..5844c873 100755 --- a/tools/restore_scodoc7_data.sh +++ b/tools/restore_scodoc7_data.sh @@ -88,11 +88,15 @@ for f in "$SRC"/SCO*.dump do echo "Loading postgres database from $f" pg_restore --create -d SCODOC --no-owner "$f" - if [ ! "$?" -eq 0 ] - then - printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting." - exit 1 - fi + # le pg_restore a parfois des erreurs sans gravités... + # voir https://www.postgresql.org/message-id/20849.1541638465%40sss.pgh.pa.us + # donc on ne peut pas se fier au code de retour. + # Demander aux utilisateurs de vérifier eux meêm que les bases sont OK + # if [ ! "$?" -eq 0 ] + # then + # printf "Error restoring postgresql database\nPlease check that SQL server is running\nAborting." + # exit 1 + # fi done # \ No newline at end of file