Skip site navigation (1) Skip section navigation (2)

Re: stack usage in toast_insert_or_update()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Pavan Deolasee <pavan(dot)deolasee(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: stack usage in toast_insert_or_update()
Date: 2007-02-01 17:08:48
Message-ID: 19395.1170349728@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> On 1/31/2007 12:41 PM, Tom Lane wrote:
>> We can't change TOAST_MAX_CHUNK_SIZE without forcing an initdb, but I
>> think that it would be safe to remove the MAXALIGN'ing of the tuple
>> size in the tests in heapam.c, that is

> Can't we maxalign the page header in the calculations?

Actually, the page header size *is* maxaligned.  The problem is that
TOAST_TUPLE_THRESHOLD isn't.

We could make it so, but that would change TOAST_MAX_CHUNK_SIZE thus
forcing an initdb.  I think simply removing the MAXALIGN operations
in the code is a better answer, as it eliminates some rather pointless
overhead.  There's no particular reason why the threshold needs to be
maxaligned ...

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-02-01 17:17:21
Subject: Why is ecpg segfaulting on buildfarm member "clownfish"?
Previous:From: Tom LaneDate: 2007-02-01 16:57:31
Subject: Re: Estimation error in n_dead_tuples

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group