Generic Messages for Logical Decoding

API and mechanism to allow generic messages to be inserted into WAL that are
intended to be read by logical decoding plugins. This commit adds an optional
new callback to the logical decoding API.

Messages are either text or bytea. Messages can be transactional, or not, and
are identified by a prefix to allow multiple concurrent decoding plugins.

(Not to be confused with Generic WAL records, which are intended to allow crash
recovery of extensible objects.)

Author: Petr Jelinek and Andres Freund
Reviewers: Artur Zakirov, Tomas Vondra, Simon Riggs
Discussion: 5685f999.6010...@2ndquadrant.com

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/3fe3511d05127cc024b221040db2eeb352e7d716

Modified Files
--------------
contrib/test_decoding/Makefile                  |   2 +-
contrib/test_decoding/expected/ddl.out          |  21 ++--
contrib/test_decoding/expected/messages.out     |  79 ++++++++++++++++
contrib/test_decoding/sql/ddl.sql               |   3 +-
contrib/test_decoding/sql/messages.sql          |  25 +++++
contrib/test_decoding/test_decoding.c           |  18 ++++
doc/src/sgml/func.sgml                          |  45 +++++++++
doc/src/sgml/logicaldecoding.sgml               |  38 ++++++++
src/backend/access/rmgrdesc/Makefile            |   6 +-
src/backend/access/rmgrdesc/logicalmsgdesc.c    |  41 ++++++++
src/backend/access/transam/rmgr.c               |   1 +
src/backend/replication/logical/Makefile        |   2 +-
src/backend/replication/logical/decode.c        |  46 +++++++++
src/backend/replication/logical/logical.c       |  38 ++++++++
src/backend/replication/logical/logicalfuncs.c  |  27 ++++++
src/backend/replication/logical/message.c       |  87 +++++++++++++++++
src/backend/replication/logical/reorderbuffer.c | 121 ++++++++++++++++++++++++
src/backend/replication/logical/snapbuild.c     |  19 ++++
src/bin/pg_xlogdump/.gitignore                  |  21 +---
src/bin/pg_xlogdump/rmgrdesc.c                  |   1 +
src/include/access/rmgrlist.h                   |   1 +
src/include/catalog/pg_proc.h                   |   4 +
src/include/replication/logicalfuncs.h          |   2 +
src/include/replication/message.h               |  41 ++++++++
src/include/replication/output_plugin.h         |  13 +++
src/include/replication/reorderbuffer.h         |  22 +++++
src/include/replication/snapbuild.h             |   2 +
27 files changed, 693 insertions(+), 33 deletions(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

Reply via email to