From: | Euler Taveira <euler(dot)taveira(at)2ndquadrant(dot)com> |
---|---|
To: | Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: More tests with USING INDEX replident and dropped indexes |
Date: | 2020-06-03 15:08:56 |
Message-ID: | CAH503wAon6oKTpNVhMbRnD=qAFD2t+afDdHAg6SKaw-FHXgh+A@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 3 Jun 2020 at 03:14, Michael Paquier <michael(at)paquier(dot)xyz> wrote:
> On Tue, Jun 02, 2020 at 04:46:55PM +0900, Masahiko Sawada wrote:
> > 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.
>
> This looks first like complicating RemoveRelations() or the internal
> object removal APIs with a dedicated lookup at this index's pg_index
> tuple, but you could just put that in index_drop when REINDEX
> CONCURRENTLY is not used. Still, I am not sure if it is worth
> complicating those code paths. It would be better to get more
> opinions about that first.
>
>
Consistency is a good goal. Why don't we clear the relreplident from the
relation while dropping the index? relation_mark_replica_identity() already
does that but do other things too. Let's move the first code block from
relation_mark_replica_identity to another function and call this new
function
while dropping the index.
--
Euler Taveira http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2020-06-03 15:30:42 | Re: Why is pq_begintypsend so slow? |
Previous Message | Fujii Masao | 2020-06-03 13:10:41 | Re: SIGSEGV from START_REPLICATION 0/XXXXXXX in XLogSendPhysical () at walsender.c:2762 |