Re: Add GoAway protocol message for graceful but fast server shutdown/switchover

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: Jelte Fennema-Nio <me(at)jeltef(dot)nl>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Dave Cramer <davecramer(at)gmail(dot)com>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: Add GoAway protocol message for graceful but fast server shutdown/switchover
Date: 2026-01-27 12:56:50
Message-ID: CAN4CZFOw2v9G_9vuP0vnNH8K9X_UeSOyq=gWJp7bdGZ5HKNTDA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I only have a few stylistic comments and one question about the wal
sender part - but maybe I don't understand something there.

+ /*
+ * Only signal regular backends and walsenders. Skip
+ * auxiliary processes and dead-end backends.
+ */
+ if (bp->bkend_type == B_BACKEND ||
+ bp->bkend_type == B_WAL_SENDER)
+ {
+ SendProcSignal(bp->pid, PROCSIG_SMART_SHUTDOWN,
+ INVALID_PROC_NUMBER);

I don't see related changes in walsenders, am I missing something,
shouldn't this have some handling in WalSndLoop? Also, shouldn't
walsenders exit later, after normal backends have already stopped? So
I'm not sure how this is supposed to improve them.

+ /*
+ * Parse any available data to see if a GoAway message has arrived.
+ */
+ pqParseInput3(conn);

This is just stylistic, but other places seem to call parseInput instead.

There are also two typos/mistakes in the documentation:

* "rquest"
* "server requests the server"

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2026-01-27 13:34:26 Re: More speedups for tuple deformation
Previous Message Bertrand Drouvot 2026-01-27 12:55:08 Re: rename and move AssertVariableIsOfType