Re: Stability problems

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Nicolas VERGER" <nicolas(at)verger(dot)net>
Cc: "'PostgreSQL Hackers Mailing List'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Stability problems
Date: 2002-11-06 14:42:53
Message-ID: 15599.1036593773@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-announce pgsql-general pgsql-hackers

"Nicolas VERGER" <nicolas(at)verger(dot)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

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Josh Berkus 2002-11-06 17:51:38 Publish, hold article?
Previous Message Nicolas VERGER 2002-11-06 10:36:23 Stability problems

Browse pgsql-announce by date

  From Date Subject
Next Message scott.marlowe 2002-11-06 20:38:06 Re: Stability problems
Previous Message Nicolas VERGER 2002-11-06 10:36:23 Stability problems

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2002-11-06 14:51:16 Re: CURRENT_TIME
Previous Message Tommi Maekitalo 2002-11-06 14:40:15 Re: pam_pgsql, Postfix, imap and PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-11-06 14:51:16 Re: CURRENT_TIME
Previous Message Achilleus Mantzios 2002-11-06 14:10:19 Re: [SQL] Problem: Referential Integrity Constraints lost: Correction