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

From: "Jelte Fennema-Nio" <postgres(at)jeltef(dot)nl>
To: "Jelte Fennema-Nio" <me(at)jeltef(dot)nl>, "PostgreSQL Hackers" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Cc: "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-08 09:15:30
Message-ID: DFJ3E1X9169E.WV892I950LYW@jeltef.nl
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu Oct 23, 2025 at 3:04 PM CEST, Jelte Fennema-Nio wrote:
> This change introduces a new GoAway backend-to-frontend protocol
> message (byte 'g') that the server can send to the client to politely
> request that client to disconnect/reconnect when convenient.

After pushback on another threadabout introducing additional minor
protocol versions[1], I've decided to change this patch to use a
protocol extension instead of a minor version bump.

I personally don't think this patch is any better now, but that's fine.
If this means it has a chance of going into PG19, that's totally worth
it to me. (also I'd like to stop spending time on discussions where
clearly neither side will agree with eachother).

The automated test requires the not yet committed pytest changes[2]. I
don't think the automated test is required for a merge, so I don't think
this is blocked on pytest support getting in. It's here mainly as an
example and as a regression test during development, to know I did not
break the goaway functionality while changing the implementation.

[1]: https://www.postgresql.org/message-id/flat/CADK3HHKe1PA1U6aB5-7tWBQ0yZGgNvY7H=ECDD9955Pas_zx_Q(at)mail(dot)gmail(dot)com
[2]: https://commitfest.postgresql.org/patch/6045/

Attachment Content-Type Size
nocfbot.v3-0002-Add-pytest-based-tests-for-GoAway-message.patch text/x-patch 6.2 KB
v3-0001-Add-GoAway-protocol-message-for-graceful-but-fast.patch text/x-patch 27.2 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message shveta malik 2026-01-08 09:21:17 Re: Proposal: Conflict log history table for Logical Replication
Previous Message Neil Chen 2026-01-08 08:48:51 Re: Optimize SnapBuildPurgeOlderTxn: use in-place compaction instead of temporary array