]> granicus.if.org Git - postgresql/commit
Introduce replication slots.
authorRobert Haas <rhaas@postgresql.org>
Sat, 1 Feb 2014 03:45:17 +0000 (22:45 -0500)
committerRobert Haas <rhaas@postgresql.org>
Sat, 1 Feb 2014 03:45:36 +0000 (22:45 -0500)
commit858ec11858a914d4c380971985709b6d6b7dd6fc
tree59eb508185cd8544c3485919a25dee15f3818c21
parent5bdef38b8917cfbe206d14969c61a5d38fc822b6
Introduce replication slots.

Replication slots are a crash-safe data structure which can be created
on either a master or a standby to prevent premature removal of
write-ahead log segments needed by a standby, as well as (with
hot_standby_feedback=on) pruning of tuples whose removal would cause
replication conflicts.  Slots have some advantages over existing
techniques, as explained in the documentation.

In a few places, we refer to the type of replication slots introduced
by this patch as "physical" slots, because forthcoming patches for
logical decoding will also have slots, but with somewhat different
properties.

Andres Freund and Robert Haas
42 files changed:
doc/src/sgml/catalogs.sgml
doc/src/sgml/config.sgml
doc/src/sgml/func.sgml
doc/src/sgml/high-availability.sgml
doc/src/sgml/protocol.sgml
doc/src/sgml/recovery-config.sgml
doc/src/sgml/ref/pg_receivexlog.sgml
src/backend/access/transam/xlog.c
src/backend/catalog/system_views.sql
src/backend/replication/Makefile
src/backend/replication/README
src/backend/replication/basebackup.c
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c
src/backend/replication/repl_gram.y
src/backend/replication/repl_scanner.l
src/backend/replication/slot.c [new file with mode: 0644]
src/backend/replication/slotfuncs.c [new file with mode: 0644]
src/backend/replication/walreceiver.c
src/backend/replication/walreceiverfuncs.c
src/backend/replication/walsender.c
src/backend/storage/ipc/ipci.c
src/backend/storage/ipc/procarray.c
src/backend/storage/lmgr/lwlock.c
src/backend/storage/lmgr/proc.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/bin/initdb/initdb.c
src/bin/pg_basebackup/pg_receivexlog.c
src/bin/pg_basebackup/receivelog.c
src/bin/pg_basebackup/streamutil.c
src/bin/pg_basebackup/streamutil.h
src/include/access/xlog.h
src/include/catalog/catversion.h
src/include/catalog/pg_proc.h
src/include/nodes/nodes.h
src/include/nodes/replnodes.h
src/include/replication/slot.h [new file with mode: 0644]
src/include/replication/walreceiver.h
src/include/storage/lwlock.h
src/include/storage/procarray.h
src/test/regress/expected/rules.out
src/tools/pgindent/typedefs.list