pgsql: Allow logical decoding via the walsender interface. - Mailing list pgsql-committers

From Robert Haas
Subject pgsql: Allow logical decoding via the walsender interface.
Date
Msg-id E1WN4VC-0006RR-Pb@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Allow logical decoding via the walsender interface.

In order for this to work, walsenders need the optional ability to
connect to a database, so the "replication" keyword now allows true
or false, for backward-compatibility, and the new value "database"
(which causes the "dbname" parameter to be respected).

walsender needs to loop not only when idle but also when sending
decoded data to the user and when waiting for more xlog data to decode.
This means that there are now three separate loops inside walsender.c;
although some refactoring has been done here, this is still a bit ugly.

Andres Freund, with contributions from Álvaro Herrera, and further
review by me.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/5a991ef8692ed0d170b44958a81a6bd70e90585c

Modified Files
--------------
doc/src/sgml/protocol.sgml                         |   24 +-
src/backend/postmaster/postmaster.c                |   28 +-
.../libpqwalreceiver/libpqwalreceiver.c            |    6 +-
src/backend/replication/repl_gram.y                |   81 +-
src/backend/replication/repl_scanner.l             |    1 +
src/backend/replication/walsender.c                |  913 +++++++++++++++++---
src/backend/utils/init/postinit.c                  |   15 +-
src/bin/pg_basebackup/pg_basebackup.c              |    4 +-
src/bin/pg_basebackup/pg_receivexlog.c             |    4 +-
src/bin/pg_basebackup/receivelog.c                 |    4 +-
src/include/replication/walsender.h                |    1 +
src/tools/pgindent/typedefs.list                   |    1 +
12 files changed, 915 insertions(+), 167 deletions(-)


pgsql-committers by date:

Previous
From: Robert Haas
Date:
Subject: pgsql: Teach on_exit_reset() to discard pending cleanups for dsm.
Next
From: Robert Haas
Date:
Subject: pgsql: Allow dynamic shared memory segments to be kept until shutdown.