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

From Zsolt Parragi
Subject Re: Add GoAway protocol message for graceful but fast server shutdown/switchover
Date
Msg-id CAN4CZFPYS4iDCK3oYs3zp77K50ra6C=Hvg5-ymt9KR0OFmuGQA@mail.gmail.com
Whole thread
In response to Re: Add GoAway protocol message for graceful but fast server shutdown/switchover  ("Jelte Fennema-Nio" <postgres@jeltef.nl>)
List pgsql-hackers
+ if (!goaway_reported && PQgoAwayReceived(pset.db))
+ {
+ pg_log_info("Server sent GoAway, requesting disconnect when convenient.");
+ goaway_reported = true;
+ }

Shouldn't this variable be reset in pqDropServerData?

+    It is possible for NoticeResponse, ParameterStatus and GoAway
messages to be
     interspersed between CopyData messages; frontends must handle these cases,

The patch currently doesn't actually do this, did you add this as
future proofing?


> I thought some more about this, but ultimately, the payloads you suggest
> only seem useful if a client has something inbetween "disconnect hard
> now" and "disconnect when the connection is unused"

Couldn't a client optimize the reconnect time if it knows about the
deadline? If it knows that it still has 10 minutes before the server
kicks it out, it might choose to finish a 3-4 minute task, reconnect,
and then continue.



pgsql-hackers by date:

Previous
From: Zsolt Parragi
Date:
Subject: Re: [Patch] New pg_stat_tablespace view
Next
From: Alvaro Herrera
Date:
Subject: Re: Adding REPACK [concurrently]