Re: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default - Mailing list pgsql-bugs

From Andrew Dunstan
Subject Re: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default
Date
Msg-id 759e997e-e1ca-91cd-84db-f4ae963fada1@dunslane.net
Whole thread Raw
In response to BUG #17056: Segmentation fault on altering the type of the foreign table column with a default  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-bugs
On 6/12/21 5:50 PM, Andres Freund wrote:
> Hi,
>
> On 2021-06-12 17:40:38 -0400, Andrew Dunstan wrote:
>> Ok, I think the attached is the least we need to do. Given this I
>> haven't been able to induce a crash even when the catalog is hacked with
>> bogus missing values on a foreign table. But I'm not 100% convinced I
>> have fixed all the places that need to be fixed.
> Hm. There's a few places that look at atthasmissing and just assume that
> there's corresponding information about the missing field. And as far as
> I can see the proposed changes in RelationBuildTupleDesc() don't unset
> atthasmissing, they just prevent the constraint part of the tuple desc
> from being filled. Wouldn't this cause problems if we reach code like
>

Yes, you're right. This version should take care of things better.


Thanks for looking.


cheers


andrew


Attachment

pgsql-bugs by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default
Next
From: PG Bug reporting form
Date:
Subject: BUG #17058: Unable to create collation in version 13.