Hi,

> 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?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

Reply via email to