[pgpool-committers: 7060] pgpool: Display more informative error message in authentication proces

Tatsuo Ishii ishii at sraoss.co.jp
Sun Aug 30 11:43:36 JST 2020


Display more informative error message in authentication process.

When backends offers mistakenly different authentication methods,
pgpool just showed:

          "unable to read message length"
          "message length (%d) in slot %d does not match with slot 0(%d)", length, i, length0)));

because pool_read_message_length() called ereport(ERROR) in this
case. Actually the caller pool_do_auth() prepared more informative
message:

        ereport(ERROR,
                        (errmsg("invalid authentication packet from backend"),
                         errdetail("failed to get the authentication packet length"),
                         errhint("This is likely caused by the inconsistency of auth method among DB nodes. \
                                                Please check the previous error messages (hint: length field) \
                                                from pool_read_message_length and recheck the pg_hba.conf settings.")));

Change ereport(ERROR) to ereport(LOG) in pool_read_message_length() so
that the informative message actually shows up.

Branch
------
V3_7_STABLE

Details
-------
https://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=fd27549973ed40fc84ee6c167aad0edb1e9b4cbb

Modified Files
--------------
src/auth/pool_auth.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)



More information about the pgpool-committers mailing list