pgsql: Introduce Streaming Replication.

From: heikki(at)postgresql(dot)org (Heikki Linnakangas)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Introduce Streaming Replication.
Date: 2010-01-15 09:19:11
Message-ID: 20100115091911.F14DC7541B9@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-committers

Log Message:
-----------
Introduce Streaming Replication.

This includes two new kinds of postmaster processes, walsenders and
walreceiver. Walreceiver is responsible for connecting to the primary server
and streaming WAL to disk, while walsender runs in the primary server and
streams WAL from disk to the client.

Documentation still needs work, but the basics are there. We will probably
pull the replication section to a new chapter later on, as well as the
sections describing file-based replication. But let's do that as a separate
patch, so that it's easier to see what has been added/changed. This patch
also adds a new section to the chapter about FE/BE protocol, documenting the
protocol used by walsender/walreceivxer.

Bump catalog version because of two new functions,
pg_last_xlog_receive_location() and pg_last_xlog_replay_location(), for
monitoring the progress of replication.

Fujii Masao, with additional hacking by me

Modified Files:
--------------
pgsql/doc/src/sgml:
backup.sgml (r2.135 -> r2.136)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/backup.sgml?r1=2.135&r2=2.136)
client-auth.sgml (r1.125 -> r1.126)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/client-auth.sgml?r1=1.125&r2=1.126)
config.sgml (r1.243 -> r1.244)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/config.sgml?r1=1.243&r2=1.244)
func.sgml (r1.495 -> r1.496)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/func.sgml?r1=1.495&r2=1.496)
high-availability.sgml (r1.35 -> r1.36)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/high-availability.sgml?r1=1.35&r2=1.36)
perform.sgml (r1.72 -> r1.73)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/perform.sgml?r1=1.72&r2=1.73)
protocol.sgml (r1.76 -> r1.77)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/doc/src/sgml/protocol.sgml?r1=1.76&r2=1.77)
pgsql/src:
Makefile (r1.47 -> r1.48)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/Makefile?r1=1.47&r2=1.48)
pgsql/src/backend:
Makefile (r1.139 -> r1.140)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/Makefile?r1=1.139&r2=1.140)
pgsql/src/backend/access/nbtree:
nbtsort.c (r1.121 -> r1.122)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/nbtree/nbtsort.c?r1=1.121&r2=1.122)
pgsql/src/backend/access/transam:
recovery.conf.sample (r1.5 -> r1.6)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/recovery.conf.sample?r1=1.5&r2=1.6)
xlog.c (r1.357 -> r1.358)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/access/transam/xlog.c?r1=1.357&r2=1.358)
pgsql/src/backend/bootstrap:
bootstrap.c (r1.255 -> r1.256)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/bootstrap/bootstrap.c?r1=1.255&r2=1.256)
pgsql/src/backend/commands:
cluster.c (r1.192 -> r1.193)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/cluster.c?r1=1.192&r2=1.193)
copy.c (r1.320 -> r1.321)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/copy.c?r1=1.320&r2=1.321)
tablecmds.c (r1.314 -> r1.315)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.314&r2=1.315)
pgsql/src/backend/executor:
execMain.c (r1.341 -> r1.342)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/executor/execMain.c?r1=1.341&r2=1.342)
pgsql/src/backend/libpq:
be-secure.c (r1.95 -> r1.96)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/be-secure.c?r1=1.95&r2=1.96)
hba.c (r1.194 -> r1.195)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/hba.c?r1=1.194&r2=1.195)
pg_hba.conf.sample (r1.68 -> r1.69)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/pg_hba.conf.sample?r1=1.68&r2=1.69)
pqcomm.c (r1.201 -> r1.202)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/pqcomm.c?r1=1.201&r2=1.202)
pgsql/src/backend/postmaster:
bgwriter.c (r1.65 -> r1.66)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/bgwriter.c?r1=1.65&r2=1.66)
postmaster.c (r1.600 -> r1.601)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/postmaster/postmaster.c?r1=1.600&r2=1.601)
pgsql/src/backend/storage/ipc:
ipci.c (r1.102 -> r1.103)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/ipci.c?r1=1.102&r2=1.103)
pmsignal.c (r1.29 -> r1.30)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/ipc/pmsignal.c?r1=1.29&r2=1.30)
pgsql/src/backend/storage/lmgr:
proc.c (r1.211 -> r1.212)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/storage/lmgr/proc.c?r1=1.211&r2=1.212)
pgsql/src/backend/tcop:
postgres.c (r1.581 -> r1.582)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/tcop/postgres.c?r1=1.581&r2=1.582)
pgsql/src/backend/utils/init:
postinit.c (r1.200 -> r1.201)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/init/postinit.c?r1=1.200&r2=1.201)
pgsql/src/backend/utils/misc:
guc.c (r1.532 -> r1.533)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/guc.c?r1=1.532&r2=1.533)
postgresql.conf.sample (r1.272 -> r1.273)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/misc/postgresql.conf.sample?r1=1.272&r2=1.273)
pgsql/src/include:
Makefile (r1.30 -> r1.31)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/Makefile?r1=1.30&r2=1.31)
pgsql/src/include/access:
xlog.h (r1.95 -> r1.96)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog.h?r1=1.95&r2=1.96)
xlog_internal.h (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlog_internal.h?r1=1.27&r2=1.28)
xlogdefs.h (r1.24 -> r1.25)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/access/xlogdefs.h?r1=1.24&r2=1.25)
pgsql/src/include/bootstrap:
bootstrap.h (r1.54 -> r1.55)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/bootstrap/bootstrap.h?r1=1.54&r2=1.55)
pgsql/src/include/catalog:
catversion.h (r1.572 -> r1.573)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/catversion.h?r1=1.572&r2=1.573)
pg_proc.h (r1.561 -> r1.562)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_proc.h?r1=1.561&r2=1.562)
pgsql/src/include/libpq:
libpq-be.h (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/libpq/libpq-be.h?r1=1.73&r2=1.74)
libpq.h (r1.73 -> r1.74)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/libpq/libpq.h?r1=1.73&r2=1.74)
pgsql/src/include/storage:
pmsignal.h (r1.27 -> r1.28)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/pmsignal.h?r1=1.27&r2=1.28)
proc.h (r1.116 -> r1.117)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/storage/proc.h?r1=1.116&r2=1.117)
pgsql/src/include/utils:
guc_tables.h (r1.47 -> r1.48)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/utils/guc_tables.h?r1=1.47&r2=1.48)
pgsql/src/interfaces/libpq:
fe-connect.c (r1.382 -> r1.383)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-connect.c?r1=1.382&r2=1.383)
fe-protocol3.c (r1.41 -> r1.42)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-protocol3.c?r1=1.41&r2=1.42)
libpq-int.h (r1.147 -> r1.148)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/libpq-int.h?r1=1.147&r2=1.148)

Added Files:
-----------
pgsql/src/backend/replication:
Makefile (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
README (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/README?rev=1.1&content-type=text/x-cvsweb-markup)
walreceiverfuncs.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiverfuncs.c?rev=1.1&content-type=text/x-cvsweb-markup)
walsender.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walsender.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/backend/replication/walreceiver:
Makefile (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiver/Makefile?rev=1.1&content-type=text/x-cvsweb-markup)
walreceiver.c (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/replication/walreceiver/walreceiver.c?rev=1.1&content-type=text/x-cvsweb-markup)
pgsql/src/include/replication:
walreceiver.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/replication/walreceiver.h?rev=1.1&content-type=text/x-cvsweb-markup)
walsender.h (r1.1)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/replication/walsender.h?rev=1.1&content-type=text/x-cvsweb-markup)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Meskes 2010-01-15 10:44:40 pgsql: Applied patch by Boszormenyi Zoltan <zb@cybertec.at> to add
Previous Message Heikki Linnakangas 2010-01-15 09:13:08 pgsql: New Directory