Re: Problem with synchronous replication
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Cc: lingce.ldm@alibaba-inc.com, pgsql-hackers@postgresql.org
Date: 2019-10-31T01:30:56Z
Lists: pgsql-hackers
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
Commits
-
Add some assertions in syncrep.c
- e174f699c476 13.0 landed
-
Fix race condition at backend exit when deleting element in syncrep queue
- f88f7206edbf 9.4.25 landed
- 0927d0c25c56 9.5.20 landed
- 52684bc7d957 9.6.16 landed
- b99bfc3c96f1 10.11 landed
- 61f23839257d 11.6 landed
- 7b8c2de64e66 12.1 landed
- 20345197ff48 13.0 landed
-
Fix typo in comment of syncrep.c
- f921ea624eb8 13.0 landed