RE: Confused comment about drop replica identity index
Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com>
From: "houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>
To: Michael Paquier <michael@paquier.xyz>, Euler Taveira <euler@eulerto.com>
Cc: "wangw.fnst@fujitsu.com" <wangw.fnst@fujitsu.com>, Ashutosh Bapat <ashutosh.bapat.oss@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Date: 2021-12-30T06:45:30Z
Lists: 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
Commits
-
Correct comment and some documentation about REPLICA_IDENTITY_INDEX
- 9edca4cb57d2 10.20 landed
- 1a0ef5e2cc63 11.15 landed
- 861095a40987 12.10 landed
- 28e1e5c2a91c 13.6 landed
- 420f9ac1b77c 14.2 landed
- fc95d35b9429 15.0 landed
-
Add regression tests for REPLICA IDENTITY with dropped indexes
- fe7fd4e9613f 14.0 cited