postgresql/src/include/replication
Amit Kapila 1462aad2e4 Allow altering of two_phase option of a SUBSCRIPTION.
The two_phase option is controlled by both the publisher (as a slot
option) and the subscriber (as a subscription option), so the slot option
must also be modified.

Changing the 'two_phase' option for a subscription from 'true' to 'false'
is permitted only when there are no pending prepared transactions
corresponding to that subscription. Otherwise, the changes of already
prepared transactions can be replicated again along with their corresponding
commit leading to duplicate data or errors.

To avoid data loss, the 'two_phase' option for a subscription can only be
changed from 'false' to 'true' once the initial data synchronization is
completed. Therefore this is performed later by the logical replication worker.

Author: Hayato Kuroda, Ajin Cherian, Amit Kapila
Reviewed-by: Peter Smith, Hou Zhijie, Amit Kapila, Vitaly Davydov, Vignesh C
Discussion: https://postgr.es/m/8fab8-65d74c80-1-2f28e880@39088166
2024-07-24 10:13:36 +05:30
..
decode.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logical.h Ensure that the sync slots reach a consistent state after promotion without losing data. 2024-04-03 14:04:59 +05:30
logicallauncher.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalproto.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalrelation.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
logicalworker.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
message.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
origin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
output_plugin.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
pgoutput.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
reorderbuffer.h Replace binaryheap + index with pairingheap in reorderbuffer.c 2024-04-11 17:04:38 +09:00
slot.h Allow altering of two_phase option of a SUBSCRIPTION. 2024-07-24 10:13:36 +05:30
slotsync.h Remove unused function prototype 2024-04-19 09:58:04 +02:00
snapbuild.h Fix possibility of logical decoding partial transaction changes. 2024-07-11 22:48:23 +09:00
syncrep.h Update copyright for 2024 2024-01-03 20:49:05 -05:00
walreceiver.h Allow altering of two_phase option of a SUBSCRIPTION. 2024-07-24 10:13:36 +05:30
walsender.h Introduce a new GUC 'standby_slot_names'. 2024-03-08 08:10:45 +05:30
walsender_private.h Rename standby_slot_names to synchronized_standby_slots. 2024-07-01 11:36:56 +05:30
worker_internal.h Allow altering of two_phase option of a SUBSCRIPTION. 2024-07-24 10:13:36 +05:30