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