Re: pg_log_fatal vs pg_log_error - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: pg_log_fatal vs pg_log_error
Date
Msg-id c3bae0c8-9fda-2b0d-f3be-90fe069da0af@2ndquadrant.com
Whole thread Raw
In response to pg_log_fatal vs pg_log_error  (Antonin Houska <ah@cybertec.at>)
Responses Re: pg_log_fatal vs pg_log_error
List pgsql-hackers
On 2019-06-17 14:19, Antonin Houska wrote:
> Can anyone please give me a hint (and possibly add some comments to the code)
> when pg_log_fatal() should be used in frontend code and when it's appropriate
> to call pg_log_error()? The current use does not seem very consistent.

For a program that runs in a loop, like for example psql or
pg_receivewal, use error if the program keeps running and fatal if not.
For one-shot programs like for example createdb, there is no difference,
so we have used error in those cases.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: [Proposal] Table-level Transparent Data Encryption (TDE) and KeyManagement Service (KMS)
Next
From: Peter Eisentraut
Date:
Subject: Allow an alias to be attached directly to a JOIN ... USING