From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Heikki Linnakangas <heikki(at)enterprisedb(dot)com> |
Cc: | Joe Conway <mail(at)joeconway(dot)com>, "Hackers (PostgreSQL)" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: crash on 8.2 and cvshead - failed to add item to the |
Date: | 2007-01-26 15:49:18 |
Message-ID: | 24343.1169826558@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> IMHO the right fix is to modify PageGetFreeSpace not to do the
> subtraction, it's a hack anyway, but that means we have to go through
> and fix every caller of it. Or we can add a new PageGetReallyFreeSpace
> function and keep the old one for compatibility. What do we want?
It'd probably be a good idea to take a look at each caller and see
whether it has a problem with that. I believe PageGetFreeSpace's
behavior is actually the right thing for many of 'em. The idea is that
subtracting the 4 bytes is often necessary and always safe/conservative
(but is that true in this case? We're overestimating dataitemtotal,
can that hurt us?). Is it worth changing each caller to try to account
exactly for those 4 bytes?
In short, I'm inclined to leave the function alone unless changing it
can be shown to be a win for most callers. Add a new function
(perhaps PageGetExactFreeSpace would be a better name).
Keep in mind also that we need a minimal-change version for
back-patching. If this is cleanup rather than bug fix, please
submit it separately.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2007-01-26 15:53:47 | Re: Proposal: Commit timestamp |
Previous Message | Joshua D. Drake | 2007-01-26 15:46:59 | Re: HAVING push-down |