Re: Built-in plugin for logical decoding output

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Alvaro Hernandez <aht(at)ongres(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Petr Jelinek <petr(dot)jelinek(at)2ndquadrant(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Gregory Brail <gregbrail(at)google(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Built-in plugin for logical decoding output
Date: 2017-09-26 07:55:49
Message-ID: CAMsr+YFG1ZRkVGu35dAbpr7GL-Y7DxCWxK5Lg7FVfDk-cL9ugA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 26 September 2017 at 15:26, Alvaro Hernandez <aht(at)ongres(dot)com> wrote:

>
> That's better than nothing. But as much as interoperable json may be,
> people still need to talk the (binary) replication protocol to use it.
>

No, they don't.

They can use the SQL interface to logical decoding.

We could enhance that with a few small changes to make it a lot more useful
too. Most importantly, allow a long-polling model, where you can wait if
there's nothing to consume rather than getting an immediate empty
result-set.

I expect the walsender protocol to be dealt with by client drivers, not
user applications, much like you never really deal with the regular libpq
protocol in your app. PgJDBC and psycopg2 already support it. It'd be nice
if libpq offered some helper interfaces for C apps, and I'd help review any
such patch.

Nothing against binary output, but as you noted, we can likely use pgoutput
for that to some extent at least. I think the pressing need is json, going
by the zillion plugins out there for it.

--
Craig Ringer http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-09-26 08:27:44 Re: Optimise default partition scanning while adding new partition
Previous Message Mark Kirkwood 2017-09-26 07:44:49 Re: tablespaces inside $PGDATA considered harmful