From: | shveta malik <shveta(dot)malik(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | "Zhijie Hou (Fujitsu)" <houzj(dot)fnst(at)fujitsu(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Nisha Moond <nisha(dot)moond412(at)gmail(dot)com>, "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, vignesh C <vignesh21(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, shveta malik <shveta(dot)malik(at)gmail(dot)com> |
Subject: | Re: Conflict detection for update_deleted in logical replication |
Date: | 2025-09-15 04:55:07 |
Message-ID: | CAJpy0uBJ32khb3x6RsWSVrXgEWQx=w0pc=zxKA2aPOCb2eNYgA@mail.gmail.com |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
One concern:
if (should_stop_conflict_info_retention(rdt_data))
+ {
+ /*
+ * Stop retention if not yet. Otherwise, reset to the initial phase to
+ * retry all phases. This is required to recalculate the current wait
+ * time and resume retention if the time falls within
+ * max_retention_duration.
+ */
+ if (MySubscription->retentionactive)
+ rdt_data->phase = RDT_STOP_CONFLICT_INFO_RETENTION;
+ else
+ reset_retention_data_fields(rdt_data);
+
return;
+ }
Instead of above code changes, shall we have:
if (should_stop_conflict_info_retention(rdt_data))
rdt_data->phase = RDT_STOP_CONFLICT_INFO_RETENTION; (always)
And then stop_conflict_info_retention() should have these checks:
if (MySubscription->retentionactive)
{
...update flag and perform stop (current functionality)
}
else
{
Assert(!TransactionIdIsValid(MyLogicalRepWorker->oldest_nonremovable_xid));
reset_retention_data_fields(rdt_data);
}
thanks
Shveta
From | Date | Subject | |
---|---|---|---|
Next Message | Shubham Khanna | 2025-09-15 05:24:19 | Re: Add support for specifying tables in pg_createsubscriber. |
Previous Message | Amit Kapila | 2025-09-15 04:51:54 | Re: Conflict detection for update_deleted in logical replication |