On Wed, 2023-05-17 at 12:34 -0700, Andres Freund wrote: > I understood Jeff's proposal to just have an early exit if there are > no > walsenders connected at all.
My suggestion was we early exit unless there is at least one *waiting* walsender of the appropriate type. In other words, increment the counter on entry to WalSndWait() and decrement on exit. I didn't look in detail yet, so perhaps it's not easy/cheap to do that safely. Regards, Jeff Davis