Re: More tests with USING INDEX replident and dropped indexes - Mailing list pgsql-hackers

From Masahiko Sawada
Subject Re: More tests with USING INDEX replident and dropped indexes
Date
Msg-id CA+fd4k6E5FQURHVW0VJ7mFiwRE1w5XoowSUHubL2WVtJoGaAYA@mail.gmail.com
Whole thread Raw
In response to More tests with USING INDEX replident and dropped indexes  (Michael Paquier <michael@paquier.xyz>)
Responses Re: More tests with USING INDEX replident and dropped indexes
List pgsql-hackers
On Fri, 22 May 2020 at 12:50, Michael Paquier <michael@paquier.xyz> wrote:
>
> Hi all,
>
> While working on some other logical decoding patch recently, I bumped
> into the fact that we have special handling for the case of REPLICA
> IDENTITY USING INDEX when the dependent index is dropped, where the
> code handles that case as an equivalent of NOTHING.
>
> Attached is a patch to add more coverage for that.  Any thoughts?

How about avoiding such an inconsistent situation? In that case,
replica identity works as NOTHING, but pg_class.relreplident is still
‘i’, confusing users. It seems to me that dropping an index specified
by REPLICA IDENTITY USING INDEX is not a valid operation.

Regards,

--
Masahiko Sawada            http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: elog(DEBUG2 in SpinLocked section.
Next
From: Fujii Masao
Date:
Subject: Re: Resetting spilled txn statistics in pg_stat_replication