On Wed, Nov 11, 2026 at 10:37 AM Baji Shaik <[email protected]> wrote: > > On Wed, Nov 11, 2026 at 11:46 AM Bharath Rupireddy > <[email protected]> wrote: >> >> >> I have a slightly different opinion here. I understand that a leader >> erroring out while launching parallely apply workers has costs. >> However, DSM running out of segments, IMO, is rare in practice and the >> issue is not reported from the field. Even if it is hit in practice, >> the recovery from that error is automatic for the apply worker starts >> again and callers of make_new_segment() would hit OOM or similar error >> anyway. I would just apply it for HEAD and be done with it. > > > Thanks for the review, Bharath. HEAD only works for me. > I will leave the back-patching decision to the committer. >
I've reviewed both patches and both look good to me. Regarding backpatching these patches, I'm inclined to backpatch both of them. Regarding the parallel apply worker issue, it seems a bug to me. As for the 0001 patch, the apply worker would restart even in the problematic case, but it could error out again as it receives STREAM START and cannot create a new DSM because all segments are still in use. Therefore the replication would stop, which violates what the documentation says. Regarding the 0002 patch, it simply violates what DSA_ALLOC_NO_OOM promises. IIUC make_new_segment() is implemented to exit gracefully even in erroneous cases so that its caller can handle the situation. A caller using DSA_ALLOC_NO_OOM gets an error if DSM slots are used up, instead of InvalidDsaPointer. Regards, -- Masahiko Sawada Amazon Web Services: https://aws.amazon.com
