On Thu, Aug 20, 2026 at 8:15 AM Zhijie Hou (Fujitsu)
<[email protected]> wrote:
>
> One more thing 0001 could potentially do is replace the existing references to
> stream_xid with ApplyRemoteCtx.remote_xid. It's not done in the patch yet, but
> can be if we reach consensus.
>

We can do this without breaking anything but this doesn't sound
fundamentally correct. Because stream_xid is valid only inside a
STREAM START/STOP block whereas remote_ctx.remote_xid is valid for the
whole transaction(including the COMMIT/PREPARE/ABORT phase), and is
used for non-streamed transactions. So remote_xid is deliberately
valid at moments when stream_xid is deliberately Invalid. So, I
suggest leaving this as it is.

I have made few changes in 0001 refactor patch (a) Change the mix use
of errarg and remote_ctx in apply_error_callback as that looks
confusing, instead used a shorter variable name ctx so that some of
the lines where it is used doesn't overflow, (b) changed comments at
various places. Let me know what you think of attached.

-- 
With Regards,
Amit Kapila.

Attachment: v71_1-0001-Remove-the-redundant-remote_final_lsn-variable.patch
Description: Binary data

Reply via email to