[pgpool-hackers: 4076] in_hot_standby

Tatsuo Ishii ishii at sraoss.co.jp
Thu Dec 16 11:31:10 JST 2021


PostgreSQL 14 introduced new config parameter: in_hot_standby
https://www.postgresql.org/docs/14/runtime-config-preset.html

"Reports whether the server is currently in hot standby mode. When
this is on, all transactions are forced to be read-only. Within a
session, this can change only if the server is promoted to be
primary. See Section 27.4 for more information."

The value is either "on" for standby servers or "off" for primary
servers. This is sent upon connecting to the server.

The problem:

When Pgpool-II connects to PostgreSQL backend servers, in_hot_standby
is sent as well as other config parameters. Pgpool-II checks each
config parameter has the same length among servers. Of course
in_hot_standby has different length depending on whether it's a
primary server or standby server. As a result each time pgpool
connects to PostgreSQL following log is recorded.

2021-12-16 10:40:34.855: psql pid 366965: LOG:  reading message length
2021-12-16 10:40:34.855: psql pid 366965: DETAIL:  message length (22) in slot 1 does not match with slot 0(23)

This is pretty annoying and I want to eliminate this. An ugly solution
for this is, check the parameter name and if it's in_hot_standby, then
skip the check.

Any better solution?

Best reagards,
--
Tatsuo Ishii
SRA OSS, Inc. Japan
English: http://www.sraoss.co.jp/index_en.php
Japanese:http://www.sraoss.co.jp


More information about the pgpool-hackers mailing list