Re: Feature Request - DDL deployment with logical replication

From: Craig Ringer <craig(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Nikhil Sontakke <nikhils(at)2ndquadrant(dot)com>, Jeremy Finzel <finzelj(at)gmail(dot)com>, Konstantin Knizhnik <k(dot)knizhnik(at)postgrespro(dot)ru>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Feature Request - DDL deployment with logical replication
Date: 2018-04-02 15:07:17
Message-ID: CAMsr+YHgHZNX0JiN1xAdByzcmpiruYh4E+RRRO2UFug2ih+1sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1 April 2018 at 00:57, Andres Freund <andres(at)anarazel(dot)de> wrote:

> On 2018-03-31 22:13:42 +0800, Craig Ringer wrote:
> > We'll still need a mechanism to transport them to downstreams (like WAL
> > messages) and to send responses upstream. For responses I think we will
> > finally want to add a backchannel to the logical replication protocol as
> > I've wanted for a long while: downstream can send a COPY message on COPY
> > BOTH proto back to upstream, which passes it to a callback on the output
> > plugin for the output plugin to act on.
>
> Not necessarily? You can just send out the prepare, wait for all
> clients to ack it, and then commit/rollback prepared.
>

We then lack any mechanism by which you can NACK, saying "I can't apply
this".

So upstream will wait indefinitely. I guess we just expect the user to
intervene and ROLLBACK if they decide a replica isn't going to get the job
done, or have checked the replica's logs and found it can't apply it for
some hopefully-sane reason.

It's not like we'd auto-ROLLBACK PREPARED in response to a nack from a
downstream anyway, so all we're missing is probably info in the upstream
logs about which replica(s) cannot apply it and why.

OK. So it'd be a nice-to-have, but not vital.

--
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 Robert Haas 2018-04-02 15:26:38 Re: [HACKERS] Restrict concurrent update/delete with UPDATE of partition key
Previous Message Robert Haas 2018-04-02 15:05:25 Re: disable SSL compression?