From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com> |
Cc: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Problem with logical replication |
Date: | 2020-05-11 07:28:52 |
Message-ID: | 20200511072852.GE88791@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, May 10, 2020 at 07:08:03PM -0300, Euler Taveira wrote:
> I attached a patch with the described solution. I also included a test that
> covers this scenario.
- Assert(RelationGetReplicaIndex(rel) == RelationGetRelid(idxrel));
+ Assert(GetRelationIdentityOrPK(rel) == RelationGetRelid(idxrel));
Not much a fan of adding a routine to relcache.c to do the work of two
routines already present, so I think that we had better add an extra
condition based on RelationGetPrimaryKeyIndex, and give up on
GetRelationIdentityOrPK() in execReplication.c. Wouldn't it also be
better to cross-check the replica identity here depending on if
RelationGetReplicaIndex() returns an invalid OID or not?
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Kyotaro Horiguchi | 2020-05-11 08:13:54 | Re: pg_regress cleans up tablespace twice. |
Previous Message | Michael Paquier | 2020-05-11 06:54:02 | Re: Strange decreasing value of pg_last_wal_receive_lsn() |