Downgrading some normal ERROR messages to DEBUG messages.
authorBo Peng <pengbo@sraoss.co.jp>
Thu, 9 Nov 2023 12:52:43 +0000 (21:52 +0900)
committerBo Peng <pengbo@sraoss.co.jp>
Thu, 9 Nov 2023 12:52:43 +0000 (21:52 +0900)
commit4bfca73c6788cee498d74e938fa38c38b9abb6a2
treefc6ec7d9ca7ee1b8238ebb6ce8cd5a8b5881f889
parent1f29743eca975a654847a7e921fe8bb58cd19608
Downgrading some normal ERROR messages to DEBUG messages.

The following ERROR messages are downgraded to DEBUG messages.

(1) ERROR:unable to flush data to frontend

(2) ERROR:  unable to read data from frontend
    DETAIL:  EOF encountered with frontend

(3) ERROR:  unable to read data
    DETAIL:  child connection forced to terminate due to client_idle_limit:30 is reached

(1) and (2)
These messages are cuased when the client did not send a terminate message
before disconnecting to pgpool.
For example, when the client process was forcefully terminated, the error occurs.
Although they are harmless, it can sometimes confuse users.

(3)
If we set "client_idle_limit" to a non-zero value, the connection
will be disconnected if it remains idle since the last query.

The disconnection is caused by Pgpool-II settings,
but Pgpool-II handles the log message as an "ERROR".

Because the ERROR messages above are normal messages, I decide to downgrade them.

Discussion: https://www.pgpool.net/pipermail/pgpool-hackers/2023-June/004351.html
src/include/utils/elog.h
src/include/utils/fe_ports.h
src/protocol/pool_process_query.c
src/tools/fe_port.c
src/utils/error/elog.c
src/utils/pool_stream.c