On Fri, Jul 29, 2022 at 10:57 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> I wonder if these problems would go away as a nice incidental
> side-effect if we used latches for postmaster wakeups. I don't
> know... maybe, if the problem is just with the postmaster's pattern of
> blocking/unblocking? Maybe backend startup is simple enough that it
> doesn't hit the bug? From a quick glance, I think the assertion
> failures that occur in regular backends can possibly be blamed on the
> postmaster getting confused about its children due to unexpected
> handler re-entry.
Just to connect the dots, that's what this patch does:
https://www.postgresql.org/message-id/flat/CA+hUKG+Z-HpOj1JsO9eWUP+ar7npSVinsC_npxSy+jdOMsx=Gg@mail.gmail.com
(There may be other places that break under Cygwin's flaky sa_mask
implementation, I don't know and haven't seen any clues about that.)