Re: logical replication seems broken

From: er(at)xs4all(dot)nl
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: logical replication seems broken
Date: 2021-02-12 16:30:31
Message-ID: 522121056.124036.1613147431818@webmailclassic.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 02/12/2021 1:51 PM Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> wrote:
>
>
> On Fri, Feb 12, 2021 at 6:04 PM Erik Rijkers <er(at)xs4all(dot)nl> wrote:
> >
> > Hello,
> >
> > I am seeing errors in replication in a test program that I've been running for years with very little change (since 2017, really [1]).

Hi,

Here is a test program. Careful, it deletes stuff. And it will need some changes:

I compile postgres server versions into directories like:
$HOME/pg_stuff/pg_installations/pgsql.$project where project is a name

The attached script (logrep_cascade_bug.sh) assumes that two such compiled versions are present (on my machine they are called HEAD and head0):
$HOME/pg_stuff/pg_installations/pgsql.HEAD --> git master as of today - friday 12 febr 2021
$HOME/pg_stuff/pg_installations/pgsql.head0 --> 3063eb17593c so that's from 11 febr, before the replication changes

In the test script, bash variables 'project' (and 'BIN') reflect my set up - so should probably be changed.

The instance from today 12 february ('HEAD') has the bug:
it keeps endlessly waiting/looping with 'NOK' (=Not OK).
'Not OK' means: primary not identical to all replicas (replica1 seems ok, but replica2 remains empty)

The instance from yesterday 11 february ('head0') is ok:
it finishes in 20 s after waiting/looping just 2 or 3 times
'ok' means: all replicas are identical to primary (as proven by the md5s).

That's all I have for now - I have no deeper idea about what exactly goes wrong.

I hope that helps, let me know when you cannot reproduce the problem.

Erik Rijkers

Attachment Content-Type Size
logrep_cascade_bug.sh application/x-shellscript 8.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anastasia Lubennikova 2021-02-12 16:42:26 Re: some pointless HeapTupleHeaderIndicatesMovedPartitions calls
Previous Message Ranier Vilela 2021-02-12 16:11:58 Re: Possible dereference after null check (src/backend/executor/ExecUtils.c)