Hi,

On Thu, Oct 29, 2026 at 03:29 PM "Hayato Kuroda (Fujitsu)" wrote:
While reviewing another logical replication thread, I noticed an issue
with altering a subscription's two_phase option.

Good catch.

I think we can fix this by not resetting subtwophasestate to PENDING
when two_phase is already in the ENABLED state, as shown in the attached
patch.

+1 the fix, but I have a quick confirmation.

Assuming that twophasestate is 'e' and the user runs ALTER SUBSCRIPTION SET
(two_phase = on). In this case all attributes are retained as-is but 
update_tuple
is set to true anyway - CatalogTupleUpdate() would update the tuple with the
completely the same tuple.

But I feel it's acceptable because 1) it rarely happens,
2) conflict_log_destination option has the same issue, and 3) fixing it may
need wider changes, like setting update_tuple in the if-statement, thought?

Right. This is the same as all (or most) subscription options and even other object options like publication options have the same behavior, since we don't compare the new value with the old one in most cases. So I think that's an independent topic.

--
Best Regards,
Zhijie Hou


Reply via email to