postgresql/src/bin/pg_dump
Amit Kapila 705e20f855 Optionally disable subscriptions on error.
Logical replication apply workers for a subscription can easily get stuck
in an infinite loop of attempting to apply a change, triggering an error
(such as a constraint violation), exiting with the error written to the
subscription server log, and restarting.

To partially remedy the situation, this patch adds a new subscription
option named 'disable_on_error'. To be consistent with old behavior, this
option defaults to false. When true, both the tablesync worker and apply
worker catch any errors thrown and disable the subscription in order to
break the loop. The error is still also written in the logs.

Once the subscription is disabled, users can either manually resolve the
conflict/error or skip the conflicting transaction by using
pg_replication_origin_advance() function. After resolving the conflict,
users need to enable the subscription to allow apply process to proceed.

Author: Osumi Takamichi and Mark Dilger
Reviewed-by: Greg Nancarrow, Vignesh C, Amit Kapila, Wang wei, Tang Haiying, Peter Smith, Masahiko Sawada, Shi Yu
Discussion : https://postgr.es/m/DB35438F-9356-4841-89A0-412709EBD3AB%40enterprisedb.com
2022-03-14 09:32:40 +05:30
..
po Translation updates 2021-06-21 12:33:50 +02:00
t Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts. 2022-03-04 18:53:13 -08:00
.gitignore Clean up after pg_dump test runs. 2016-05-06 22:28:01 -04:00
common.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
compress_io.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
compress_io.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
dumputils.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
dumputils.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00
nls.mk Translation updates 2021-05-10 14:36:21 +02:00
parallel.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
parallel.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_backup.h Add support for --no-table-access-method in pg_{dump,dumpall,restore} 2022-01-17 14:51:46 +09:00
pg_backup_archiver.c Free temporary memory when reading TOC 2022-02-09 14:12:55 +01:00
pg_backup_archiver.h contrib/sslinfo needs a fix too to make hamerkop happy. 2021-11-07 11:33:53 -05:00
pg_backup_custom.c Yet more elimination of dead stores and useless initializations. 2020-09-05 13:17:32 -04:00
pg_backup_db.c Clean up some more freshly-dead code in pg_dump and pg_upgrade. 2021-12-16 12:01:59 -05:00
pg_backup_db.h Revert "pg_dump: Lock all relations, not just plain tables". 2020-11-06 15:48:04 -05:00
pg_backup_directory.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_backup_null.c Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
pg_backup_tar.c Handle close() failures more robustly in pg_dump and pg_basebackup. 2021-11-17 13:08:25 -05:00
pg_backup_tar.h Fix tar files emitted by pg_dump and pg_basebackup to be POSIX conformant. 2012-09-28 15:19:15 -04:00
pg_backup_utils.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_backup_utils.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_dump.c Optionally disable subscriptions on error. 2022-03-14 09:32:40 +05:30
pg_dump.h Optionally disable subscriptions on error. 2022-03-14 09:32:40 +05:30
pg_dump_sort.c Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_dumpall.c Add missing binary-upgrade guard. 2022-02-17 10:53:51 -05:00
pg_restore.c Add support for --no-table-access-method in pg_{dump,dumpall,restore} 2022-01-17 14:51:46 +09:00