Allow pgoutput to send logical decoding messages.
authorAmit Kapila <akapila@postgresql.org>
Tue, 6 Apr 2021 03:10:47 +0000 (08:40 +0530)
committerAmit Kapila <akapila@postgresql.org>
Tue, 6 Apr 2021 03:10:47 +0000 (08:40 +0530)
commitac4645c0157fc5fcef0af8ff571512aa284a2cec
treea414a4b21e4a79ac04cd67b8ed4ac907d9856f76
parent531737ddad214cb8a675953208e2f3a6b1be122b
Allow pgoutput to send logical decoding messages.

The output plugin accepts a new parameter (messages) that controls if
logical decoding messages are written into the replication stream. It is
useful for those clients that use pgoutput as an output plugin and needs
to process messages that were written by pg_logical_emit_message().

Although logical streaming replication protocol supports logical
decoding messages now, logical replication does not use this feature yet.

Author: David Pirotte, Euler Taveira
Reviewed-by: Euler Taveira, Andres Freund, Ashutosh Bapat, Amit Kapila
Discussion: https://postgr.es/m/CADK3HHJ-+9SO7KuRLH=9Wa1rAo60Yreq1GFNkH_kd0=CdaWM+A@mail.gmail.com
doc/src/sgml/protocol.sgml
src/backend/replication/logical/proto.c
src/backend/replication/logical/worker.c
src/backend/replication/pgoutput/pgoutput.c
src/include/replication/logicalproto.h
src/include/replication/pgoutput.h
src/test/subscription/t/020_messages.pl [new file with mode: 0644]