Re: Minimal logical decoding on standbys
Jeff Davis <pgsql@j-davis.com>
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Reduce the log level in 035_standby_logical_decoding.pl.
- 3034dc56ef4b 16.0 landed
-
035_standby_logical_decoding: Add missing waits for replication
- 57411c82ce86 16.0 landed
-
For cascading replication, wake physical and logical walsenders separately
- e101dfac3a53 16.0 landed
-
Handle logical slot conflicts on standby
- 26669757b6a7 16.0 landed
-
Support invalidating replication slots due to horizon and wal_level
- be87200efd93 16.0 landed
-
Prevent use of invalidated logical slot in CreateDecodingContext()
- 4397abd0a2af 16.0 landed
-
Replace replication slot's invalidated_at LSN with an enum
- 15f8203a5975 16.0 landed
-
Pass down table relation into more index relation functions
- 61b313e47eb9 16.0 landed
-
Assert only valid flag bits are passed to visibilitymap_set()
- a88a18b1250b 16.0 landed
-
Remove unused _bt_delitems_delete() argument.
- dc43492e46c7 14.0 cited
-
Add xl_btree_delete optimization.
- d2e5e20e5711 13.0 cited
On Thu, 2023-03-02 at 10:20 +0100, Drouvot, Bertrand wrote: > Right, but in our case, right after the wakeup (the one due to the CV > broadcast, > aka the one that will remove it from the wait queue) we'll exit the > loop due to: > > " > /* check whether we're done */ > if (loc <= RecentFlushPtr) > break; > " > > as the CV broadcast means that a flush/replay occurred. But does it mean that the flush/replay advanced *enough* to be greater than or equal to loc? > - If it is awakened due to the CV broadcast, then we'll right after > exit the loop (see above) ... > I think that's not needed as we'd exit the loop right after we are > awakened by a CV broadcast. See the comment here: * If this process has been taken out of the wait list, then we know * that it has been signaled by ConditionVariableSignal (or * ConditionVariableBroadcast), so we should return to the caller. But * that doesn't guarantee that the exit condition is met, only that we * ought to check it. You seem to be arguing that in this case, it doesn't matter; that walreceiver knows what walsender is waiting for, and will never wake it up before it's ready. I don't think that's true, and even if it is, it needs explanation. > > I agree that's a good idea and that it should/would work too. I just > wanted to highlight that in this particular > case that might not be necessary to build this new API. In this case it looks easier to add the right API than to be sure about whether it's needed or not. Regards, Jeff Davis