Re: psql terminates on first error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Holger Jakobs <holger(at)jakobs(dot)com>
Cc: "pgsql-admin(at)lists(dot)postgresql(dot)org" <pgsql-admin(at)lists(dot)postgresql(dot)org>
Subject: Re: psql terminates on first error
Date: 2023-03-02 14:33:30
Message-ID: 1897764.1677767610@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Holger Jakobs <holger(at)jakobs(dot)com> writes:
> While trying to transfer data from one instance to another using
> pg_dumpall and psql, the psql stopped on first error, causing pg_dumpall
> to terminate as well.
> This behaviour was seen on Windows (EDB installer), but is different on
> Linux.
> Only when using an option -c "\set ON_ERROR_STOP false" (plus -f - of
> course to continue reading) psql continued after first error.
> Not even the option -v ON_ERROR_STOP=0 helped.
> Why is the behaviour between Linux and Windows different? This is not
> reflected in the documentation.

It shouldn't be different. However, this report would be trivially
explained if your Windows machine has an %APPDATA%\postgresql\psqlrc.conf
file that turns ON_ERROR_STOP on. You could try invoking psql with
the -X command line switch to prevent reading that.

regards, tom lane

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Holger Jakobs 2023-03-02 14:36:25 Re: psql terminates on first error
Previous Message Erik Wienhold 2023-03-02 13:45:08 Re: psql terminates on first error