Introduce "replication_identifiers" to keep track of remote nodes. replication-identifiers
authorAndres Freund <[email protected]>
Fri, 22 Feb 2013 16:43:27 +0000 (17:43 +0100)
committerAndres Freund <[email protected]>
Wed, 11 Dec 2013 15:34:17 +0000 (16:34 +0100)
commitd04cd9cca5e6e1425bf69dfe9417e684021f8960
tree29ddc0f0fa2487983d321f1a61d2caa0949d8bd1
parentbcc111df21e5a68d4f41381720e41d35ddff5994
Introduce "replication_identifiers" to keep track of remote nodes.

Replication identifiers can be used to track & lookup remote nodes identified
via (sysid, tlid, remote_dbid, local_dbid, name) and map that tuple to a local
uint16.

Keyed by that replication identifier the progress of replication from
that system is tracked in a crashsafe manner.

Support for tracking that via output plugins is added as well.

Needs a catversion bump.
28 files changed:
src/backend/access/rmgrdesc/xactdesc.c
src/backend/access/transam/xact.c
src/backend/access/transam/xlog.c
src/backend/catalog/Makefile
src/backend/catalog/catalog.c
src/backend/catalog/system_views.sql
src/backend/replication/logical/Makefile
src/backend/replication/logical/decode.c
src/backend/replication/logical/logical.c
src/backend/replication/logical/reorderbuffer.c
src/backend/replication/logical/replication_identifier.c [new file with mode: 0644]
src/backend/storage/ipc/ipci.c
src/backend/utils/cache/syscache.c
src/backend/utils/misc/guc.c
src/bin/initdb/initdb.c
src/bin/pg_resetxlog/pg_resetxlog.c
src/include/access/xact.h
src/include/access/xlog.h
src/include/access/xlogdefs.h
src/include/catalog/indexing.h
src/include/catalog/pg_proc.h
src/include/catalog/pg_replication_identifier.h [new file with mode: 0644]
src/include/replication/logical.h
src/include/replication/reorderbuffer.h
src/include/replication/replication_identifier.h [new file with mode: 0644]
src/include/utils/syscache.h
src/test/regress/expected/rules.out
src/test/regress/expected/sanity_check.out