From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Introduce replication slots. |
Date: | 2014-02-01 03:50:47 |
Message-ID: | E1W9RbT-0003e1-89@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/858ec11858a914d4c380971985709b6d6b7dd6fc
Modified Files
--------------
doc/src/sgml/catalogs.sgml | 99 ++
doc/src/sgml/config.sgml | 19 +
doc/src/sgml/func.sgml | 70 ++
doc/src/sgml/high-availability.sgml | 94 +-
doc/src/sgml/protocol.sgml | 64 +-
doc/src/sgml/recovery-config.sgml | 16 +
doc/src/sgml/ref/pg_receivexlog.sgml | 18 +
src/backend/access/transam/xlog.c | 95 +-
src/backend/catalog/system_views.sql | 12 +
src/backend/replication/Makefile | 2 +-
src/backend/replication/README | 5 +-
src/backend/replication/basebackup.c | 4 +
.../libpqwalreceiver/libpqwalreceiver.c | 16 +-
src/backend/replication/repl_gram.y | 54 +-
src/backend/replication/repl_scanner.l | 57 +-
src/backend/replication/slot.c | 1066 ++++++++++++++++++++
src/backend/replication/slotfuncs.c | 193 ++++
src/backend/replication/walreceiver.c | 5 +-
src/backend/replication/walreceiverfuncs.c | 13 +-
src/backend/replication/walsender.c | 197 +++-
src/backend/storage/ipc/ipci.c | 3 +
src/backend/storage/ipc/procarray.c | 42 +
src/backend/storage/lmgr/lwlock.c | 4 +
src/backend/storage/lmgr/proc.c | 5 +
src/backend/utils/misc/guc.c | 12 +
src/backend/utils/misc/postgresql.conf.sample | 3 +
src/bin/initdb/initdb.c | 1 +
src/bin/pg_basebackup/pg_receivexlog.c | 5 +
src/bin/pg_basebackup/receivelog.c | 49 +-
src/bin/pg_basebackup/streamutil.c | 1 +
src/bin/pg_basebackup/streamutil.h | 1 +
src/include/access/xlog.h | 1 +
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.h | 8 +
src/include/nodes/nodes.h | 2 +
src/include/nodes/replnodes.h | 32 +
src/include/replication/slot.h | 120 +++
src/include/replication/walreceiver.h | 11 +-
src/include/storage/lwlock.h | 4 +-
src/include/storage/procarray.h | 2 +
src/test/regress/expected/rules.out | 9 +
src/tools/pgindent/typedefs.list | 2 +
42 files changed, 2356 insertions(+), 62 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2014-02-01 07:47:47 | Re: pgsql: Introduce replication slots. |
Previous Message | Bruce Momjian | 2014-02-01 03:40:14 | pgsql: docs: mention 'g' is not in the regex embedded options table |