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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 707576b) | patch
Logical replication support for initial data copy
2017年3月23日 12:36:36 +0000 (08:36 -0400)
2017年3月23日 12:55:37 +0000 (08:55 -0400)
commit 7c4f52409a8c7d85ed169bbbc1f6092274d03920
Logical replication support for initial data copy

Add functionality for a new subscription to copy the initial data in the
tables and then sync with the ongoing apply process.

For the copying, add a new internal COPY option to have the COPY source
data provided by a callback function. The initial data copy works on
the subscriber by receiving COPY data from the publisher and then
providing it locally into a COPY that writes to the destination table.

A WAL receiver can now execute full SQL commands. This is used here to
obtain information about tables and publications.

Several new options were added to CREATE and ALTER SUBSCRIPTION to
control whether and when initial table syncing happens.

Change pg_dump option --no-create-subscription-slots to
--no-subscription-connect and use the new CREATE SUBSCRIPTION
... NOCONNECT option for that.

Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Tested-by: Erik Rijkers <er@xs4all.nl>
62 files changed:
contrib/file_fdw/file_fdw.c diff | blob | blame | history
doc/src/sgml/catalogs.sgml diff | blob | blame | history
doc/src/sgml/config.sgml diff | blob | blame | history
doc/src/sgml/logical-replication.sgml diff | blob | blame | history
doc/src/sgml/monitoring.sgml diff | blob | blame | history
doc/src/sgml/protocol.sgml diff | blob | blame | history
doc/src/sgml/ref/alter_subscription.sgml diff | blob | blame | history
doc/src/sgml/ref/create_subscription.sgml diff | blob | blame | history
doc/src/sgml/ref/pg_dump.sgml diff | blob | blame | history
src/backend/catalog/Makefile diff | blob | blame | history
src/backend/catalog/heap.c diff | blob | blame | history
src/backend/catalog/pg_publication.c 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/copy.c diff | blob | blame | history
src/backend/commands/subscriptioncmds.c diff | blob | blame | history
src/backend/parser/gram.y diff | blob | blame | history
src/backend/postmaster/pgstat.c diff | blob | blame | history
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c diff | blob | blame | history
src/backend/replication/logical/Makefile diff | blob | blame | history
src/backend/replication/logical/launcher.c diff | blob | blame | history
src/backend/replication/logical/relation.c diff | blob | blame | history
src/backend/replication/logical/snapbuild.c diff | blob | blame | history
src/backend/replication/logical/tablesync.c [new file with mode: 0644] blob
src/backend/replication/logical/worker.c diff | blob | blame | history
src/backend/replication/repl_gram.y diff | blob | blame | history
src/backend/replication/repl_scanner.l diff | blob | blame | history
src/backend/replication/walsender.c diff | blob | blame | history
src/backend/tcop/postgres.c diff | blob | blame | history
src/backend/utils/adt/misc.c diff | blob | blame | history
src/backend/utils/cache/syscache.c diff | blob | blame | history
src/backend/utils/misc/guc.c diff | blob | blame | history
src/bin/pg_dump/pg_backup.h diff | blob | blame | history
src/bin/pg_dump/pg_dump.c diff | blob | blame | history
src/bin/pg_dump/t/002_pg_dump.pl diff | blob | blame | history
src/include/catalog/catversion.h diff | blob | blame | history
src/include/catalog/indexing.h diff | blob | blame | history
src/include/catalog/pg_proc.h diff | blob | blame | history
src/include/catalog/pg_subscription_rel.h [new file with mode: 0644] blob
src/include/commands/copy.h diff | blob | blame | history
src/include/nodes/nodes.h diff | blob | blame | history
src/include/nodes/parsenodes.h diff | blob | blame | history
src/include/nodes/replnodes.h diff | blob | blame | history
src/include/parser/kwlist.h diff | blob | blame | history
src/include/pgstat.h diff | blob | blame | history
src/include/replication/logical.h diff | blob | blame | history
src/include/replication/logicallauncher.h diff | blob | blame | history
src/include/replication/snapbuild.h diff | blob | blame | history
src/include/replication/walreceiver.h diff | blob | blame | history
src/include/replication/walsender.h diff | blob | blame | history
src/include/replication/worker_internal.h diff | blob | blame | history
src/include/utils/syscache.h diff | blob | blame | history
src/test/regress/expected/object_address.out diff | blob | blame | history
src/test/regress/expected/rules.out diff | blob | blame | history
src/test/regress/expected/sanity_check.out diff | blob | blame | history
src/test/regress/expected/subscription.out diff | blob | blame | history
src/test/regress/sql/object_address.sql diff | blob | blame | history
src/test/regress/sql/subscription.sql diff | blob | blame | history
src/test/subscription/t/001_rep_changes.pl diff | blob | blame | history
src/test/subscription/t/002_types.pl diff | blob | blame | history
src/test/subscription/t/003_constraints.pl diff | blob | blame | history
src/test/subscription/t/004_sync.pl [new file with mode: 0644] blob
This is the main PostgreSQL git repository.
RSS Atom

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