| From: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
|---|---|
| To: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com> |
| Cc: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, saurabh singh <saurabh(dot)singh214(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, shveta malik <shveta(dot)malik(at)gmail(dot)com> |
| Subject: | Re: Proposal: Conflict log history table for Logical Replication |
| Date: | 2026-08-21 09:45:59 |
| Message-ID: | CAA4eK1LKpyAqQq=gtmCjjb_HG844b_Xs4RiR0TbzuD=YJmKL6Q@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, Aug 20, 2026 at 8:15 AM Zhijie Hou (Fujitsu)
<houzj(dot)fnst(at)fujitsu(dot)com> 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 | Content-Type | Size |
|---|---|---|
| v71_1-0001-Remove-the-redundant-remote_final_lsn-variable.patch | application/octet-stream | 23.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ashutosh Sharma | 2026-08-21 09:51:16 | Re: Orphaned Files in PostgreSQL |
| Previous Message | Zsolt Parragi | 2026-08-21 09:36:34 | Re: MERGE/SPLIT PARTITIONS issues/questions |