Re: Skipping logical replication transactions on subscriber side

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Greg Nancarrow <gregn4422(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, "tanghy(dot)fnst(at)fujitsu(dot)com" <tanghy(dot)fnst(at)fujitsu(dot)com>, "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, "osumi(dot)takamichi(at)fujitsu(dot)com" <osumi(dot)takamichi(at)fujitsu(dot)com>, Alexey Lesovsky <lesovsky(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Skipping logical replication transactions on subscriber side
Date: 2021-11-19 09:14:55
Message-ID: CAA4eK1KBzM=7DkWHQpeHUn-t1SV0K3kK8vra0jiZe5X5tCm4gg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Nov 19, 2021 at 1:22 PM Greg Nancarrow <gregn4422(at)gmail(dot)com> wrote:
>
> On Fri, Nov 19, 2021 at 5:52 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
> > Why that Assert will hit? We seem to be always passing 'create' as
> > true so it should create a new entry. I think a similar situation can
> > happen for functions and it will be probably cleaned in the next
> > vacuum cycle.
> >
> Oops, I missed that too. So at worst, vacuum will clean it up in the
> out-of-order SUBSCRIPTIONPURGE,SUBWORKERERROR case.
>
> But I still think the current code may not correctly handle
> first_error_time/last_error_time timestamps if out-of-order
> SUBWORKERERROR messages occur, right?
>

Yeah in such a case last_error_time can be shown as a time before
first_error_time but I don't think that will be a big problem, the
next message will fix it. I don't see what we can do about it and the
same is true for other cases like pg_stat_archiver where the success
and failure times can be out of order. If we want we can remove one of
those times but I don't think this happens frequently enough to be
considered a problem. Anyway, these stats are not considered to be
updated with the most latest info.

--
With Regards,
Amit Kapila.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-11-19 09:30:42 Re: Skipping logical replication transactions on subscriber side
Previous Message Soumyadeep Chakraborty 2021-11-19 08:35:04 Re: Unnecessary delay in streaming replication due to replay lag