Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 9F2339FB6D6; Wed, 13 Jun 2007 23:29:00 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 56402-08; Wed, 13 Jun 2007 23:28:54 -0300 (ADT) X-Greylist: delayed 00:24:24.743868 by SQLgrey-1.7.4 X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id C614E9FB6ED; Wed, 13 Jun 2007 23:28:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from europa.idg.com.au (europa.idg.com.au [203.34.46.9]) by svr4.postgresql.org (Postfix) with ESMTP id E77305AF948; Thu, 14 Jun 2007 02:04:26 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by europa.idg.com.au (Postfix) with ESMTP id C8CA533D26; Thu, 14 Jun 2007 12:02:07 +1000 (EST) X-Virus-Scanned: Debian amavisd-new at europa.idg.com.au Received: from europa.idg.com.au ([127.0.0.1]) by localhost (europa.idg.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Uipi+jxW9rWH; Thu, 14 Jun 2007 12:02:02 +1000 (EST) Received: by europa.idg.com.au (Postfix, from userid 1000) id 33D8633D33; Thu, 14 Jun 2007 12:02:02 +1000 (EST) Date: Thu, 14 Jun 2007 12:02:02 +1000 From: Pascal Hakim To: pgsql-general@postgresql.org, pgsql-admin@postgresql.org Cc: Joost Kraaijeveld Subject: Re: [GENERAL] psql : Error: Cannot stat /pgdata/8.2/main Message-ID: <20070614020202.GS15526@idg.com.au> References: <1181713452.3856.12.camel@panoramix> <9233.1181742352@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9233.1181742352@sss.pgh.pa.us> User-Agent: Mutt/1.5.13 (2006-08-11) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/115 X-Sequence-Number: 25783 On Wed, Jun 13, 2007 at 09:45:52AM -0400, Tom Lane wrote: > Joost Kraaijeveld 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