pgsql: Generic Messages for Logical Decoding - Mailing list pgsql-committers

From Simon Riggs
Subject pgsql: Generic Messages for Logical Decoding
Date
Msg-id E1anjRj-0000Nn-S3@gemulon.postgresql.org
Whole thread Raw
Responses Re: pgsql: Generic Messages for Logical Decoding  (Michael Paquier <michael.paquier@gmail.com>)
Re: pgsql: Generic Messages for Logical Decoding  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pgsql: Generic Messages for Logical Decoding  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-committers
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.6010202@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(-)


pgsql-committers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] pgsql: Avoid archiving XLOG_RUNNING_XACTS on idle server