Re: walsender.c fileheader comment - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: walsender.c fileheader comment
Date
Msg-id ba1295b3-0d74-4fd1-b244-6f81bbb6061e@enterprisedb.com
Whole thread Raw
In response to Re: walsender.c fileheader comment  (Peter Smith <smithpb2250@gmail.com>)
List pgsql-hackers
On 7/19/24 07:02, Peter Smith wrote:
> ...
>>
>> To conclude, I think this probably makes the comments more confusing. If
>> we want to make it clearer, I'd probably start by clarifying what the
>> "stopping" state means. Also, it's a bit surprising we may not actually
>> go through the "stopping" state during shutdown.
>>
> 
> I agree. My interpretation of the (ambiguous) "stopping" state led me
> to believe the comment was quite wrong. So, this thread was only
> intended as a trivial comment fix in passing but clearly there is more
> to this than I anticipated. I would be happy if someone with more
> knowledge about the WALSNDSTATE_STOPPING versus got_STOPPING could
> disambiguate the file header comment, but that's not me, so I have
> withdrawn this from the Commitfest.
> 

Understood. Thanks for the patch anyway, I appreciate you took the time
to try to improve the comments!

I agree the state transitions in walsender are not very clear, and the
fact that it may shutdown without ever going through STOPPING state is
quite confusing. That being said, I personally don't have ambition to
improve this.


regards

-- 
Tomas Vondra
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Set log_lock_waits=on by default
Next
From: Robert Haas
Date:
Subject: Re: Things I don't like about \du's "Attributes" column