git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 315ae75) | patch
Add ALTER SUBSCRIPTION ... SKIP.
2022年3月22日 01:41:19 +0000 (07:11 +0530)
2022年3月22日 01:41:19 +0000 (07:11 +0530)
commit 208c5d65bbd60e33e272964578cb74182ac726a8
Add ALTER SUBSCRIPTION ... SKIP.

This feature allows skipping the transaction on subscriber nodes.

If incoming change violates any constraint, logical replication stops
until it's resolved. Currently, users need to either manually resolve the
conflict by updating a subscriber-side database or by using function
pg_replication_origin_advance() to skip the conflicting transaction. This
commit introduces a simpler way to skip the conflicting transactions.

The user can specify LSN by ALTER SUBSCRIPTION ... SKIP (lsn = XXX),
which allows the apply worker to skip the transaction finished at
specified LSN. The apply worker skips all data modification changes within
the transaction.

Author: Masahiko Sawada
Reviewed-by: Takamichi Osumi, Hou Zhijie, Peter Eisentraut, Amit Kapila, Shi Yu, Vignesh C, Greg Nancarrow, Haiying Tang, Euler Taveira
Discussion: https://postgr.es/m/CAD21AoDeScrsHhLyEPYqN3sydg6PxAPVBboK=30xJfUVihNZDA@mail.gmail.com
18 files changed:
doc/src/sgml/catalogs.sgml diff | blob | blame | history
doc/src/sgml/logical-replication.sgml diff | blob | blame | history
doc/src/sgml/ref/alter_subscription.sgml diff | blob | blame | history
src/backend/catalog/pg_subscription.c diff | blob | blame | history
src/backend/catalog/system_views.sql diff | blob | blame | history
src/backend/commands/subscriptioncmds.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/replication/logical/worker.c diff | blob | blame | history
src/bin/pg_dump/pg_dump.c diff | blob | blame | history
src/bin/psql/describe.c diff | blob | blame | history
src/bin/psql/tab-complete.c diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/pg_subscription.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/test/regress/expected/subscription.out diff | blob | blame | history
src/test/regress/sql/subscription.sql diff | blob | blame | history
src/test/subscription/t/029_disable_on_error.pl [deleted file] blob | blame | history
src/test/subscription/t/029_on_error.pl [new file with mode: 0644] blob
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /