Here's the updated patch set. 0001 respects the duty of the page callback: supply the requested WAL bytes from the appropriate history once they are safe to read. It changes the way of waiting for the bytes to be ready, while preserving the timeline and read-limit check.
0002 includes the local and upstream promotion tests for logical slot creation and, plus a test that promotion interrupts slot synchronization blocked waiting for replay and cleans up its temporary slot. These tests cover operations could be waiting for WAL when promotion occurs. Paths that are less direct to exercise the changed wait are not covered -- SQL get/peek and slot advancement generally read WAL that is already available, two-phase state load reads an existing prepare record. Repack/slot sync worker are omitted as well since they share similar decoding setup with slot creation/synchronization. -- Regards, Xuneng Zhou HighGo Software Co., Ltd.
v12-0001-Replace-polling-with-LSN-waits-in-read_local_xlo.patch
Description: Binary data
v12-0002-Test-logical-decoding-LSN-waits-across-promotion.patch
Description: Binary data
