pgsql: Don't send "cannot connect" errors on invalid startup packet

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Don't send "cannot connect" errors on invalid startup packet
Date: 2023-12-30 20:20:31
Message-ID: E1rJfot-00CgpS-HX@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't send "cannot connect" errors on invalid startup packet

Commit 16671ba6e7 moved the code that sends "sorry, too many clients
already" and other such messages, but it had the effect that we would
send that error even if the the startup packet processing failed, e.g.
because the client sent an invalid startup packet. That was not
intentional.

Spotted while reading the code again.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5632d6e18a8afd586a99f680eddddc38b4ead769

Modified Files
--------------
src/backend/postmaster/postmaster.c | 65 +++++++++++++++++++------------------
1 file changed, 34 insertions(+), 31 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2023-12-30 22:16:01 pgsql: Minor cleanup of the BRIN parallel build code
Previous Message Peter Eisentraut 2023-12-30 19:19:43 pgsql: pg_stat_statements: Add coverage for entry_dealloc()