RE: Confused comment about drop replica identity index - Mailing list pgsql-hackers

From houzj.fnst@fujitsu.com
Subject RE: Confused comment about drop replica identity index
Date
Msg-id OS0PR01MB5716C0F50F48A87F281FB3B994459@OS0PR01MB5716.jpnprd01.prod.outlook.com
Whole thread Raw
In response to Confused comment about drop replica identity index  ("wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>)
Responses Re: Confused comment about drop replica identity index  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
On Tues, Dec 21, 2021 8:47 AM Michael Paquier <michael@paquier.xyz> wrote:
> On Mon, Dec 20, 2021 at 11:57:32AM -0300, Euler Taveira wrote:
> > What do you think about the attached patch? It forbids the DROP INDEX.
> > We might add a detail message but I didn't in this patch.
>
> Yeah.  I'd agree about doing something like that on HEAD, and that would help
> with some of the logirep-related patch currently being worked on, as far as I
> understood.

Hi,

I think forbids DROP INDEX might not completely solve this problem. Because
user could still use other command to delete the index, for example: ALTER
TABLE DROP COLUMN. After dropping the column, the index on it will also be
dropped.

Besides, user can also ALTER REPLICA IDENTITY USING INDEX "primary key", and in
this case, when they ALTER TABLE DROP CONSTR "PRIMARY KEY", the replica
identity index will also be dropped.

Best regards,
Hou zj




pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes
Next
From: SATYANARAYANA NARLAPURAM
Date:
Subject: Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes