Re: Add GoAway protocol message for graceful but fast server shutdown/switchover - Mailing list pgsql-hackers

From Jim Nasby
Subject Re: Add GoAway protocol message for graceful but fast server shutdown/switchover
Date
Msg-id CAMFBP2rSvyj6DYAw0EEBGR2UUP85ByKAC_D0djJm7rdypuMvdQ@mail.gmail.com
Whole thread Raw
In response to Re: Add GoAway protocol message for graceful but fast server shutdown/switchover  (Tomas Vondra <tomas@vondra.me>)
List pgsql-hackers
On Fri, Mar 20, 2026 at 2:20 PM Tomas Vondra <tomas@vondra.me> wrote:
* Does it make sense to tie this to smart shutdowns? I realize it's just
an example, and it probably makes sense to send the GoAway message
before a shutdown. But isn't this a bit similar to cancel/terminate of a
backend? Why not to have a pg_goaway_backend() function, that'd send the
message to a single backend? It might be useful for load-balancing, if
we could pick a "heavy" backend and ask it to reconnect / move to a
different replica. (Could that be handled by a middleware?)

+1. Another scenario that comes to mind is asking for a reconnect based on backend memory consumption, since there's a bunch of internal structures (relcache, etc) that can grow in an unbounded fashion. 

pgsql-hackers by date:

Previous
From: Jim Nasby
Date:
Subject: Re: another autovacuum scheduling thread
Next
From: Peter Smith
Date:
Subject: Re: DOCS - System Applications 'datadir' parameter