Re: walsender.c fileheader comment

From: Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: walsender.c fileheader comment
Date: 2024-07-19 13:25:18
Message-ID: ba1295b3-0d74-4fd1-b244-6f81bbb6061e@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-07-19 13:26:39 Re: Things I don't like about \du's "Attributes" column
Previous Message Christoph Berg 2024-07-19 13:24:24 Re: Set log_lock_waits=on by default