Re: [Logical Replication] TRAP: FailedAssertion("rel->rd_rel->relreplident == REPLICA_IDENTITY_DEFAULT || rel->rd_rel->relreplident == REPLICA_IDENTITY_FULL || rel->rd_rel->relreplident == REPLICA_IDENTITY_INDEX"

From: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Neha Sharma <neha(dot)sharma(at)enterprisedb(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [Logical Replication] TRAP: FailedAssertion("rel->rd_rel->relreplident == REPLICA_IDENTITY_DEFAULT || rel->rd_rel->relreplident == REPLICA_IDENTITY_FULL || rel->rd_rel->relreplident == REPLICA_IDENTITY_INDEX"
Date: 2020-01-10 02:00:34
Message-ID: CAFiTN-ux3AtKMVhtnGPBuhOwyVJ4SpXBrEdOkOQs-caNWOh6gw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 9 Jan 2020 at 10:43 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2020-01-09 13:17:59 +0530, Dilip Kumar wrote:
> > I am able to reproduce the failure, I think the assert in the
> > 'logicalrep_write_insert' is not correct. IMHO even if the replica
> > identity is set to NOTHING we should be able to replicate INSERT?
> >
> > This will fix the issue.
> >
> > diff --git a/src/backend/replication/logical/proto.c
> > b/src/backend/replication/logical/proto.c
> > index dcf7c08..471461c 100644
> > --- a/src/backend/replication/logical/proto.c
> > +++ b/src/backend/replication/logical/proto.c
> > @@ -145,7 +145,8 @@ logicalrep_write_insert(StringInfo out, Relation
> > rel, HeapTuple newtuple)
> >
> > Assert(rel->rd_rel->relreplident == REPLICA_IDENTITY_DEFAULT ||
> > rel->rd_rel->relreplident == REPLICA_IDENTITY_FULL ||
> > - rel->rd_rel->relreplident == REPLICA_IDENTITY_INDEX);
> > + rel->rd_rel->relreplident == REPLICA_IDENTITY_INDEX ||
> > + rel->rd_rel->relreplident ==
> REPLICA_IDENTITY_NOTHING);
> >
> > /* use Oid as relation identifier */
> > pq_sendint32(out, RelationGetRelid(rel));
>
> There's not much point in having this assert, right? Given that it
> covers all choices? Seems better to just drop

it.

Yeah right!
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter 2020-01-10 02:23:42 Re: 12.1 not useable: clientlib fails after a dozen queries (GSSAPI ?)
Previous Message Noah Misch 2020-01-10 01:57:36 Re: logical decoding : exceeded maxAllocatedDescs for .spill files