Re: Question about StartLogicalReplication() error path

From: Andres Freund <andres(at)anarazel(dot)de>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Jeff Davis <pgsql(at)j-davis(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about StartLogicalReplication() error path
Date: 2021-06-11 17:40:32
Message-ID: 20210611174032.az2x7uljifeqgsy5@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2021-06-11 13:15:11 -0400, Robert Haas wrote:
> On Fri, Jun 11, 2021 at 2:23 AM Jeff Davis <pgsql(at)j-davis(dot)com> wrote:
> > * The comment acknowledges that a user might expect an error in that
> > case; but doesn't really address why the user would expect an error,
> > and why it's OK to violate that expectation.
>
> This code was written by Andres, so he'd be the best person to comment
> on it, but it seems to me that the comment does explain this, and that
> it's basically the same explanation as what Amit said. If the client
> doesn't have to do anything for a certain range of WAL and just
> acknowledges it, it would under your proposal have to also durably
> record that it had chosen to do nothing, which might cause extra
> fsyncs, potentially lots of extra fsyncs if this happens frequently
> e.g. because most tables are filtered out and the replicated ones are
> only modified occasionally.

Yes, that's the motivation.

> I'm not sure that it would be a good trade-off to have a tighter
> sanity check at the expense of adding that overhead.

Especially because it very well might break existing working setups...

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2021-06-11 18:49:19 Re: Question about StartLogicalReplication() error path
Previous Message Zhihong Yu 2021-06-11 17:32:25 Re: Multi-Column List Partitioning