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

From Neil Conway
Subject Re: postmaster segfaults with HUGE table
Date
Msg-id 1100582737.23420.78.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  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: postmaster segfaults with HUGE table  (Neil Conway <neilc@samurai.com>)
List pgsql-hackers
On Mon, 2004-11-15 at 20:53 -0500, Tom Lane wrote:
> I think the SELECT limit should be MaxTupleAttributeNumber not
> MaxHeapAttributeNumber.

Ah, true -- I forgot about the distinction...

> What I think needs to happen is to check p_next_resno at some point
> after the complete tlist has been built.

Attached is a revised patch -- I just did the check at the end of
transformStmt(), since otherwise we'll need to duplicate code in the
various places that resnos are used/incremented (set operation
statements, normal selects, updates, and so on). This is somewhat
fragile in that we usually assign p_next_resno to an AttrNumber and only
check for overflow at the end of the analysis phase, but it seems safe
for the moment...

BTW I figure this should be backpatched to REL7_4_STABLE. Barring any
objections I will do that (and apply to HEAD) this evening.

-Neil


Attachment

pgsql-hackers by date:

Previous
From: schmidtm
Date:
Subject: postgresql-8.0.0beta4 works/compiles fine under Mac OS X 10.3.6
Next
From: Kevin Brown
Date:
Subject: Re: psql \e broken again