Re: Problem with logical replication

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Problem with logical replication
Дата
Msg-id 20200511072852.GE88791@paquier.xyz
обсуждение исходный текст
Ответ на Re: Problem with logical replication  (Euler Taveira <euler.taveira@2ndquadrant.com>)
Ответы Re: Problem with logical replication  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Strange decreasing value of pg_last_wal_receive_lsn()
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: pg_regress cleans up tablespace twice.