Re: [GENERAL] psql : Error: Cannot stat /pgdata/8.2/main

From: Pascal Hakim <pasc(at)linuxworld(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org, pgsql-admin(at)postgresql(dot)org
Cc: Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl>
Subject: Re: [GENERAL] psql : Error: Cannot stat /pgdata/8.2/main
Date: 2007-06-14 02:02:02
Message-ID: 20070614020202.GS15526@idg.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-general

On Wed, Jun 13, 2007 at 09:45:52AM -0400, Tom Lane wrote:
> Joost Kraaijeveld <J(dot)Kraaijeveld(at)Askesis(dot)nl> writes:
> > I have moved my database files from their default location to their own
> > partition on with their own controller and disks. PostgreSQL works OK
> > and I can connect with Pgadmin (Debian Lenny AMD64, PostgreSQL 8.2.4).
>
> > When I want to connect with psql however (with a non-root account) I get
> > the following:
>
> > panoramix:~$ psql -d my_database
> > Error: Cannot stat /pgdata/8.2/main
>
> > /pgdata/8.2/main is the location where the database files are actually
> > located.
>
> psql itself has no business touching the database directory, and a quick
> search of the source code shows no instance of "Cannot stat" anywhere in
> released PG sources.
>
> I think you are being burnt by some misbehavior of Debian's wrapper
> patches, and a complaint directed there is the next step for you.
>

It shows up a couple of times in the Debian wrapper scripts, when it's
trying to figure out which socket to actually connect to. It only gets
there after giving up on reading postgresql.conf and after giving up on
/var/run/postgresql. From the bug Joost filed in the Debian bts[1], it
looks like the Debian upgrade script got confused somehow.

Cheers,

Pasc

[1]: http://bugs.debian.org/428698
--
Pascal Hakim
Do not bend

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Shyam Sunder Rai 2007-06-14 12:40:15 Table size
Previous Message Leif B. Kristensen 2007-06-13 14:42:58 Re: psql : Error: Cannot stat /pgdata/8.2/main

Browse pgsql-general by date

  From Date Subject
Next Message Stefan Kaltenbrunner 2007-06-14 04:45:35 Re: pointer to feature comparisons, please
Previous Message Alvaro Herrera 2007-06-13 22:57:41 Re: inner join problem with temporary tables