Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX
Date: 2022-01-14 06:34:49
Message-ID: 20220114063449.3ebk7bun2goahlfq@jrouhaud
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, Dec 20, 2021 at 06:45:33AM +0000, houzj(dot)fnst(at)fujitsu(dot)com wrote:
>
> I tried to write a patch to fix this by invalidating the relcache after marking
> primary key in index_constraint_create().

The cfbot reports that you have a typo in your regression tests:

https://api.cirrus-ci.com/v1/artifact/task/4806573636714496/regress_diffs/contrib/test_decoding/regression.diffs
diff -U3 /tmp/cirrus-ci-build/contrib/test_decoding/expected/ddl.out /tmp/cirrus-ci-build/contrib/test_decoding/results/ddl.out
--- /tmp/cirrus-ci-build/contrib/test_decoding/expected/ddl.out 2022-01-11 16:46:51.684727957 +0000
+++ /tmp/cirrus-ci-build/contrib/test_decoding/results/ddl.out 2022-01-11 16:50:35.584089784 +0000
@@ -594,7 +594,7 @@
DELETE FROM table_dropped_index_no_pk WHERE b = 1;
DELETE FROM table_dropped_index_no_pk WHERE a = 3;
DROP TABLE table_dropped_index_no_pk;
--- check table with newly added primary key
+-- check tables with newly added primary key

Could you send an updated patch? As far as I can see the rest of the
regression tests succeed so the patch can probably still be reviewed. That
being said, there are pending comments by Euler so I think it's appropriate to
zsh:1: command not found: q

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2022-01-14 06:38:46 Re: RFC: Logging plan of the running query
Previous Message Thomas Munro 2022-01-14 06:30:07 Re: Add client connection check during the execution of the query