Re: BUG #17409: Unable to alter data type of clustered column which is referenced by foreign key

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Japin Li <japinli(at)hotmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, holly(dot)roberts(at)starlingbank(dot)com, peter(at)eisentraut(dot)org, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17409: Unable to alter data type of clustered column which is referenced by foreign key
Date: 2022-03-11 00:37:45
Message-ID: 755474.1646959065@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Japin Li <japinli(at)hotmail(dot)com> writes:
> Attach a new patch to fix the replica identify case, also add test cases.

Now that we realize we need to de-duplicate, it seems to me we should
postpone the get_rel_name() calls so that we don't have to do that
work repeatedly; as attached.

Also, while I've not done anything about it here, the proposed test
cases seem remarkably cavalier about their choices of test table
names. If you want to use names as generic as "parent" and "child",
they'd better be temp tables to avoid risk of conflict against other
concurrent regression tests. But most of alter_table.sql prefers
to use names starting with "at".

regards, tom lane

Attachment Content-Type Size
v3-fix-alter-data-type-of-clustered-column.patch text/x-diff 4.9 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2022-03-11 00:50:45 Re: Pg 15 devel crashes when fetching data from table using cursor
Previous Message Holly Roberts 2022-03-10 14:35:34 Re: [External] Re: BUG #17409: Unable to alter data type of clustered column which is referenced by foreign key