Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX

From: "Euler Taveira" <euler(at)eulerto(dot)com>
To: "houzj(dot)fnst(at)fujitsu(dot)com" <houzj(dot)fnst(at)fujitsu(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: relcache not invalidated when ADD PRIMARY KEY USING INDEX
Date: 2021-12-20 22:28:30
Message-ID: ce83e391-688e-4a76-a9c6-a9f75e479915@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 20, 2021, at 3:45 AM, houzj(dot)fnst(at)fujitsu(dot)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
EDB https://www.enterprisedb.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-12-20 23:09:12 Re: Schema variables - new implementation for Postgres 15
Previous Message Peter Smith 2021-12-20 21:54:09 Re: row filtering for logical replication