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

From: Japin Li <japinli(at)hotmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
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 13:18:14
Message-ID: MEYP282MB1669CD6C93FD1DCA85CAB2C1B60C9@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


On Fri, 11 Mar 2022 at 08:37, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> 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.
>

Thanks for your review. Agreed.

> 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".

My apologies! How about s/parent/atref/g and s/child/attmp/g ?

Attached v4 patch, please consider this for futher review.

--
Regrads,
Japin Li.
ChengDu WenWu Information Technology Co.,Ltd.

Attachment Content-Type Size
v4-fix-alter-data-type-of-clustered-column.patch text/x-patch 4.8 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2022-03-11 15:39:53 Re: BUG #17385: "RESET transaction_isolation" inside serializable transaction causes Assert at the transaction end
Previous Message PG Bug reporting form 2022-03-11 11:11:54 BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands