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

From Tom Lane
Subject Re: postmaster segfaults with HUGE table
Date
Msg-id 27650.1100474983@sss.pgh.pa.us
Whole thread Raw
In response to Re: postmaster segfaults with HUGE table  (Neil Conway <neilc@samurai.com>)
Responses Re: postmaster segfaults with HUGE table  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
Neil Conway <neilc@samurai.com> writes:
> This specific assertion is triggered because we represent attribute 
> numbers throughout the code base as a (signed) int16 -- the assertion 
> failure has occurred because an int16 has wrapped around due to 
> overflow. A fix would be to add a check to DefineRelation() (or even 
> earlier) to reject CREATE TABLEs with more than "MaxHeapAttributeNumber" 
> columns.

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.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Serguei Mokhov"
Date:
Subject: German-style quotes in the source file
Next
From: Simon Riggs
Date:
Subject: Re: code question: storing INTO relation