Re: [HACKERS] Sequence nexvtal() and initdb/pg_proc problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ole Gjerde <gjerde(at)icebox(dot)org>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Sequence nexvtal() and initdb/pg_proc problem
Date: 1999-05-23 22:16:14
Message-ID: 27897.927497774@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ole Gjerde <gjerde(at)icebox(dot)org> writes:
> CREATE SEQUENCE "cagedata_id_seq" start 165437 increment 1 maxvalue 2147483647 minvalue 1 cache 1 ;
> SELECT nextval ('cagedata_id_seq');
> ERROR: No such function 'nextval' with the specified attributes

Can't duplicate that here --- but it might well be related to your
busted pg_proc table ...

> I also just ran initdb on a clean install, and pg_proc.1 and
> pg_proc_proname_narg_type_index.1 gets put in /home/postgres as well as in
> /home/postgres/data/base/template1

Hmm, it sounds like something is being sloppy about attaching the full
database path to the names of relation extension files. During normal
backend operation, the backend is cd'd into the database directory,
so it doesn't really matter whether you prepend the path or not.
But evidently that's not always true during initdb. You must be running
with a very low value of RELSEG_SIZE to have precipitated such a
problem, however.

Reasonable fixes would be either to force the appropriate cd during
initdb, or to find and fix the place that's touching extension segments
using a relative pathname. But I can't get excited about spending much
time on it, since the problem will never arise at realistic RELSEG_SIZE
settings...

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-05-23 22:58:52 Re: [HACKERS] DEFAULT fixed
Previous Message Tom Lane 1999-05-23 21:46:14 Partial fix for INSERT...SELECT problems