aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/mcxtfuncs.c
diff options
context:
space:
mode:
authorAmit Kapila <akapila@postgresql.org>2024-07-24 10:13:36 +0530
committerAmit Kapila <akapila@postgresql.org>2024-07-24 10:13:36 +0530
commit1462aad2e4474ab61174f8ab00992cd3d6d57c7b (patch)
tree9649b47a93c4b7257db1295f65f8d0213c5b3537 /src/backend/utils/adt/mcxtfuncs.c
parent774d47b6c01a8b8111ae390b97343f25ebdf9267 (diff)
downloadpostgresql-1462aad2e4474ab61174f8ab00992cd3d6d57c7b.tar.gz
postgresql-1462aad2e4474ab61174f8ab00992cd3d6d57c7b.zip
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
Diffstat (limited to 'src/backend/utils/adt/mcxtfuncs.c')
0 files changed, 0 insertions, 0 deletions