Re: Confused comment about drop replica identity index

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Confused comment about drop replica identity index
Дата
Msg-id 202112161808.lxanl3r7skol@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Confused comment about drop replica identity index  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: Confused comment about drop replica identity index  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On 2021-Dec-15, Michael Paquier wrote:

> On Tue, Dec 14, 2021 at 07:10:49PM +0530, Ashutosh Bapat wrote:
> > This code in RelationGetIndexList() is not according to that comment.
> > 
> >    if (replident == REPLICA_IDENTITY_DEFAULT && OidIsValid(pkeyIndex))
> >         relation->rd_replidindex = pkeyIndex;
> >     else if (replident == REPLICA_IDENTITY_INDEX && OidIsValid(candidateIndex))
> >         relation->rd_replidindex = candidateIndex;
> >     else
> >         relation->rd_replidindex = InvalidOid;
> 
> Yeah, the comment is wrong.  If the index of a REPLICA_IDENTITY_INDEX
> is dropped, I recall that the behavior is the same as
> REPLICA_IDENTITY_NOTHING.

Hmm, so if a table has REPLICA IDENTITY INDEX and there is a publication
with an explicit column list, then we need to forbid the DROP INDEX for
that index.

I wonder why don't we just forbid DROP INDEX of an index that's been
defined as replica identity.  It seems quite silly an operation to
allow.

-- 
Álvaro Herrera           39°49'30"S 73°17'W  —  https://www.EnterpriseDB.com/
"Ed is the standard text editor."
      http://groups.google.com/group/alt.religion.emacs/msg/8d94ddab6a9b0ad3



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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Column Filtering in Logical Replication
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Apple's ranlib warns about protocol_openssl.c