"Nicolas VERGER" <nicolas@verger.net> writes:
> 2002-11-05 14:46:44 [5768] FATAL 2: failed to add item with len = 191
> to page 150 (free space 4294967096, nusd 0, noff 0)
> template1=# select version();
> PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.96
Hmm. This looks a lot like the bug I recently noted in vacuum's
free-space calculations --- but that bug only affects machines where
MAXALIGN > 4, which I would not expect for an Intel machine. Anyway
you might try this patch:
*** pgsql-server/src/backend/commands/vacuum.c 2002/10/21 22:06:19 1.243
--- pgsql-server/src/backend/commands/vacuum.c 2002/10/31 19:25:29 1.244
***************
*** 1753,1759 **** } to_vacpage->free -= MAXALIGN(tlen); if
(to_vacpage->offsets_used>= to_vacpage->offsets_free)
! to_vacpage->free -= MAXALIGN(sizeof(ItemIdData));
(to_vacpage->offsets_used)++; if (free_vtmove == 0) {
--- 1753,1759 ---- } to_vacpage->free -= MAXALIGN(tlen); if
(to_vacpage->offsets_used>= to_vacpage->offsets_free)
! to_vacpage->free -= sizeof(ItemIdData); (to_vacpage->offsets_used)++;
if (free_vtmove == 0) {
(Line numbers are for recent CVS tip and are off a little for 7.2, but
there's only one occurrence of MAXALIGN(sizeof(... in vacuum.c; you
can't miss it.)
While you are at it, be sure to update to 7.2.3. There are some
*critical* bug fixes in 7.2.3.
regards, tom lane