On Wed, Oct 30, 2019 at 12:34:28PM +0900, Kyotaro Horiguchi wrote:
> If we do that strictly, other functions like
> SyncRepGetOldestSyncRecPtr need the same Assert()s. I think static
> functions don't need Assert() and caution in their comments would be
> enough.
Perhaps. I'd rather be careful though if we meddle again with this
code in the future as it is shared across multiple places and
callers.
> SyncRepReleaseWaiters reads MyWalSnd->sync_standby_priority without
> holding SyncRepLock, which could lead to a message with wrong
> priority. I'm not sure it matters, though.
The WAL sender is the only writer of its info in shared memory, so
there is no problem to have it read data without its spin lock hold.
> Seems reasonable for holdoffs. The same assertion would be needed in
> more places but it's another issue.
Sure.
> By the way while I was looking this, I found a typo. Please find the
> attached.
Thanks, applied that one.
--
Michael