Re: postmaster segfaults with HUGE table - Mailing list pgsql-hackers

From Neil Conway
Subject Re: postmaster segfaults with HUGE table
Date
Msg-id 1100566493.23420.48.camel@localhost.localdomain
Whole thread Raw
In response to Re: postmaster segfaults with HUGE table  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: postmaster segfaults with HUGE table
List pgsql-hackers
On Sun, 2004-11-14 at 18:29 -0500, Tom Lane wrote:
> Good analysis.  We can't check earlier than DefineRelation AFAICS,
> because earlier stages don't know about inherited columns.
>
> On reflection I suspect there are similar issues with SELECTs that have
> more than 64K output columns.  This probably has to be guarded against
> in parser/analyze.c.

You're correct -- we also crash on extremely long SELECT statements.
Another variant of the problem would be a CREATE TABLE that inherits
from, say, 70 relations, each of which has 1,000 columns.

Attached is a patch. Not entirely sure that the checks I added are in
the right places, but at any rate this fixes the three identified
problems for me.

-Neil


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: backend died
Next
From: Neil Conway
Date:
Subject: Re: postmaster segfaults with HUGE table