pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Allow pgoutput to send logical decoding messages.
3+ messages / 2 participants
[nested] [flat]
* pgsql: Allow pgoutput to send logical decoding messages.
@ 2021-04-06 03:25 Amit Kapila <akapila@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Amit Kapila @ 2021-04-06 03:25 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
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
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/ac4645c0157fc5fcef0af8ff571512aa284a2cec
Modified Files
--------------
doc/src/sgml/protocol.sgml | 76 ++++++++++++++
src/backend/replication/logical/proto.c | 28 ++++++
src/backend/replication/logical/worker.c | 9 ++
src/backend/replication/pgoutput/pgoutput.c | 47 +++++++++
src/include/replication/logicalproto.h | 3 +
src/include/replication/pgoutput.h | 1 +
src/test/subscription/t/020_messages.pl | 148 ++++++++++++++++++++++++++++
7 files changed, 312 insertions(+)
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow pgoutput to send logical decoding messages.
@ 2021-04-06 08:42 Amit Kapila <amit.kapila16@gmail.com>
parent: Amit Kapila <akapila@postgresql.org>
0 siblings, 1 reply; 3+ messages in thread
From: Amit Kapila @ 2021-04-06 08:42 UTC (permalink / raw)
To: Amit Kapila <akapila@postgresql.org>; Euler Taveira <euler@eulerto.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
On Tue, Apr 6, 2021 at 8:55 AM Amit Kapila <akapila@postgresql.org> wrote:
>
> Allow pgoutput to send logical decoding messages.
>
One of the tests added by this commit is failing:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2021-04-06%2005%3A45%3A20
I think there is a race condition in one of the tests. I'll analyze
this further.
--
With Regards,
Amit Kapila.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pgsql: Allow pgoutput to send logical decoding messages.
@ 2021-04-06 09:34 Amit Kapila <amit.kapila16@gmail.com>
parent: Amit Kapila <amit.kapila16@gmail.com>
0 siblings, 0 replies; 3+ messages in thread
From: Amit Kapila @ 2021-04-06 09:34 UTC (permalink / raw)
To: Amit Kapila <akapila@postgresql.org>; Euler Taveira <euler@eulerto.com>; +Cc: pgsql-committers <pgsql-committers@lists.postgresql.org>
On Tue, Apr 6, 2021 at 2:12 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>
> On Tue, Apr 6, 2021 at 8:55 AM Amit Kapila <akapila@postgresql.org> wrote:
> >
> > Allow pgoutput to send logical decoding messages.
> >
>
> One of the tests added by this commit is failing:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=sidewinder&dt=2021-04-06%2005%3A45%3A20
>
> I think there is a race condition in one of the tests. I'll analyze
> this further.
>
As this is a timing issue so not easy to reproduce but as per my
analysis in the tests, after disabling the subscription, we were not
waiting for the replication connection to drop from the publisher. So
later when the test was trying to use the same slot to fetch the
messages via SQL API, it sometimes gives an error that the replication
slot is active for other PID. I have pushed a fix for this.
--
With Regards,
Amit Kapila.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-04-06 09:34 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 03:25 pgsql: Allow pgoutput to send logical decoding messages. Amit Kapila <akapila@postgresql.org>
2021-04-06 08:42 ` Amit Kapila <amit.kapila16@gmail.com>
2021-04-06 09:34 ` Amit Kapila <amit.kapila16@gmail.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox