Fwd: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Fwd: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default
Date: 2021-06-14 11:33:39
Message-ID: f919005d-c340-0db9-8728-a9602b98ce8f@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers


reposting to -hackers to get more eyeballs.

Summary: only RELKIND_RELATION type relations should have attributes
with atthasmissing/attmissingval

-------- Forwarded Message --------
Subject: Re: BUG #17056: Segmentation fault on altering the type of the
foreign table column with a default
Date: Sat, 12 Jun 2021 21:59:24 -0400
From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Andres Freund <andres(at)anarazel(dot)de>
CC: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, exclusion(at)gmail(dot)com,
pgsql-bugs(at)lists(dot)postgresql(dot)org

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

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachment Content-Type Size
nonlocal-missing-values-fix3.patch text/x-patch 2.7 KB

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Alvaro Herrera 2021-06-14 19:13:21 Re: BUG #17056: Segmentation fault on altering the type of the foreign table column with a default
Previous Message Sergey Fedchenko 2021-06-14 11:17:24 Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events

Browse pgsql-hackers by date

  From Date Subject
Next Message osumi.takamichi@fujitsu.com 2021-06-14 12:03:00 RE: locking [user] catalog tables vs 2pc vs logical rep
Previous Message Sergey Fedchenko 2021-06-14 11:17:24 Re: BUG #15293: Stored Procedure Triggered by Logical Replication is Unable to use Notification Events