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