Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX - Mailing list pgsql-hackers

From Euler Taveira
Subject Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX
Date
Msg-id ce83e391-688e-4a76-a9c6-a9f75e479915@www.fastmail.com
Whole thread Raw
In response to relcache not invalidated when ADD PRIMARY KEY USING INDEX  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Responses Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX
List pgsql-hackers
On Mon, Dec 20, 2021, at 3:45 AM, houzj.fnst@fujitsu.com wrote:
Hi,

When reviewing some replica identity related patches, I found that when adding
primary key using an existing unique index on not null columns, the
target table's relcache won't be invalidated.
Good catch.

It seems you can simplify your checking indexForm->indisprimary directly, no?

Why did you add new tests for test_decoding? I think the TAP tests alone are
fine. BTW, this test is similar to publisher3/subscriber3. Isn't it better to
use the same pub/sub to reduce the test execution time?


--
Euler Taveira

pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: row filtering for logical replication
Next
From: Tom Lane
Date:
Subject: Re: sqlsmith: ERROR: XX000: bogus varno: 2