Re: should we enable log_checkpoints out of the box? - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: should we enable log_checkpoints out of the box?
Date
Msg-id 06340787-179e-bdfb-691e-b118c96ff00b@wi3ck.info
Whole thread Raw
In response to Re: should we enable log_checkpoints out of the box?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: should we enable log_checkpoints out of the box?
List pgsql-hackers
On 11/3/21 09:09, Robert Haas wrote:

> For better or for worse, the
> distinction between ERROR, FATAL, and PANIC is entirely based on what
> we do after printing the message, and NOT on how serious the message
> is.

THAT is a real problem with our error handling and logging system. Often 
using RAISE in a user defined function or procedure is part of the 
communication between the application's code in the backend and the 
parts in the middleware. The information that a function rejected user 
input after a sanity check doesn't belong in the system log. It should 
produce an error message on the user's end and that is it. However, 
currently there is no way for a UDF to ensure the transaction gets 
rolled back without raising an ERROR and bloating the log.

For example the BenchmarkSQL UDF implementation raises such ERROR for 
the transactions that the TPC-C requires to contain an input error 
(non-existing ITEM), which happens on 1% of all NEW-ORDER transactions. 
Running an 8-core system with plenty of RAM close to saturation will 
generate about 10MB of log just for that per hour. That is a quarter GB 
of useless garbage, no DBA is ever going to be interested in, every day.

If anybody is worried about producing too much log output, this should 
be their primary focus.


Regards, Jan




pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: Parallelize correlated subqueries that execute within each worker
Next
From: Simon Riggs
Date:
Subject: Re: lastOverflowedXid does not handle transaction ID wraparound