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 18:29:05
Message-ID: 972551.1647023345@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> (I've not figured out yet why the "cluster" step is required to
> make this repro work.)

Oh, of course: the failure only occurs if we think the index is clustered
or a replica-identity index; else we don't store a request to rebuild it.

The attached seems to do the trick.

regards, tom lane

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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Peter Geoghegan 2022-03-11 18:42:30 Re: BUG #17255: Server crashes in index_delete_sort_cmp() due to race condition with vacuum
Previous Message Tom Lane 2022-03-11 17:37:17 Re: BUG #17409: Unable to alter data type of clustered column which is referenced by foreign key