Re: [HACKERS] Error "vacuum pg_proc"

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Mateus Cordeiro Inssa <mateus(at)ifnet(dot)com(dot)br>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Error "vacuum pg_proc"
Date: 1999-12-24 15:52:50
Message-ID: 12358.946050770@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Mateus Cordeiro Inssa <mateus(at)ifnet(dot)com(dot)br> writes:
> I got this error vacuuming pg_proc:
> ERROR: _bt_endpoint: leftmost page (20) has not leftmost flag

Hmm, I wonder if this could be yet another manifestation of the problems
that btree indexes have with oversized key values. Do you have any
procedures with long definitions? "Long" in this context means over
about 4K. If you're not sure, try
select proname from pg_proc where length(prosrc) > 4000;

If you do, try breaking them up into smaller procedures. You might have
to dump and rebuild the database to get rid of the corruption in
pg_proc's index, though.

The reason this is an issue is that btree wants to be able to store at
least two index tuples per disk page, so it has problems with indexing
values over half-a-page-less-overhead. I'm not sure exactly what the
critical size is, but it is somewhere around 4000 bytes. And pg_proc
has an index on the prosrc field.

The prosrc index is actually completely unnecessary, so we've removed
it for 7.0. Work is in progress to fix the tuple-size problem as well,
but that will probably take longer.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-12-24 16:13:39 Re: [HACKERS] Source code format votes
Previous Message DWalker 1999-12-24 15:27:59 database replication