postgresql/src/bin
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
..
initdb Database-level collation version tracking 2022-02-14 08:27:26 +01:00
pg_amcheck Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_archivecleanup Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_basebackup pg_basebackup: Clean up some bogus file extension tests. 2022-03-11 12:36:24 -05:00
pg_checksums Remove PostgreSQL::Test::Utils::perl2host completely 2022-02-20 11:51:45 -05:00
pg_config Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_controldata Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_ctl Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts. 2022-03-04 18:53:13 -08:00
pg_dump Optionally disable subscriptions on error. 2022-03-14 09:32:40 +05:30
pg_resetwal Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_rewind Rework internal command generation of pg_rewind 2022-03-01 12:52:25 +09:00
pg_test_fsync Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_test_timing Replace Test::More plans with done_testing 2022-02-11 20:54:44 +01:00
pg_upgrade Fix double declaration for check_ok() in pg_upgrade.h 2022-03-09 12:12:20 +01:00
pg_verifybackup Add support for zstd base backup compression. 2022-03-08 09:52:43 -05:00
pg_waldump Add support for zstd with compression of full-page writes in WAL 2022-03-11 12:18:53 +09:00
pgbench Fix typo in pgbench messages. 2022-03-02 08:28:12 +09:00
pgevent Update copyright for 2022 2022-01-07 19:04:57 -05:00
psql Optionally disable subscriptions on error. 2022-03-14 09:32:40 +05:30
scripts Introduce PG_TEST_TIMEOUT_DEFAULT for TAP suite non-elapsing timeouts. 2022-03-04 18:53:13 -08:00
Makefile Update copyright for 2022 2022-01-07 19:04:57 -05:00