From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RXWGP-0005K6-0L for garchives@archives.gentoo.org; Mon, 05 Dec 2011 10:59:13 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 34B4E21C055; Mon, 5 Dec 2011 10:59:02 +0000 (UTC) Received: from mail-yw0-f53.google.com (mail-yw0-f53.google.com [209.85.213.53]) by pigeon.gentoo.org (Postfix) with ESMTP id D85F0E0370 for ; Mon, 5 Dec 2011 10:57:20 +0000 (UTC) Received: by ywm19 with SMTP id 19so5029427ywm.40 for ; Mon, 05 Dec 2011 02:57:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=QKefUBF9E7f/Mn4FhpkV7GDaGHEBlb2heJc58KpHh0g=; b=I8Ka4mPfCPyhszqMYW0XtPVXG9xUC2g6XnHSC927y0xjLIw5WANeDDk/YUANLbG4FR 5wEklXXMyXsoCY0CxFLl38eli+19XHyd1+A5hEEEamVmehu3eYKhM+rrak8CfiHHzHN/ j+2BxYmr7IpvLHDewTzv0yXbGL2wUE66XwqwM= Received: by 10.236.93.4 with SMTP id k4mr2804344yhf.114.1323082640358; Mon, 05 Dec 2011 02:57:20 -0800 (PST) Received: from pacific.net.au (ppp5915.dsl.pacific.net.au. [125.255.25.21]) by mx.google.com with ESMTPS id f75sm30594305yhi.13.2011.12.05.02.57.15 (version=SSLv3 cipher=OTHER); Mon, 05 Dec 2011 02:57:19 -0800 (PST) Date: Mon, 5 Dec 2011 21:56:59 +1100 From: Gregory Shearman To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] pg_upgrade91 - You must have read and write access in the current directory Message-ID: <20111205105659.GA16909@pacific.net.au> Mail-Followup-To: gentoo-user@lists.gentoo.org References: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) X-Archives-Salt: 47f15491-aafb-45ce-b800-2e8e53dcb1e9 X-Archives-Hash: b332e609a958328c79affaf0792f40ad In linux.gentoo.user, you wrote: > On 12/05/11 13:37, Gregory Shearman wrote: >>In linux.gentoo.user, Joseph wrote: >>> I'm upgrading form posgresql 9.0 to 9.1, it seem to the upgrade went OK but when try to transfer the data >>> base: >>> pg_upgrade91 -v --old-datadir=/var/lib/postgresql/9.0/data/ --new-datadir=/var/lib/postgresql/9.1/data >>> --old-bindir=/usr/lib/postgresql-9.0/bin/ --new-bindir=/usr/lib/postgresql-9.1/bin/ >>> Running in verbose mode >>> Performing Consistency Checks >>> ----------------------------- >>> Checking current, bin, and data directories >>> You must have read and write access in the current directory. >>> Failure, exiting >>> >>> What am I doing wrong? >> >>Have you checked that you have read and write access in the current >>directory before running the command? >> >>I did the upgrade as the "postgres" user and made sure that I ran the >>command from a read/writable directory for that user. > > Yes, I did "su postgres" > and ls -al /var/lib/postgresql/9.1/ > drwx------ 13 postgres postgres 4096 Dec 4 18:20 data > > so it should work. > > -- > Joseph hmmm... Which directory are you running the command from? I ran mine from /var/lib/postgresql which has the properties: drwxr-xr-x 4 postgres root I don't recall using the command "pg_upgrade91", but I see that it is a symlink to /usr/lib/postgresql-9.1/bin/pg_upgrade This is the command that worked for me: pg_upgrade -u postgres -d /var/lib/postgresql/9.0/data -D \\ /var/lib/postgresql/9.1/data -b /usr/lib/postgresql-9.0/bin -B \\ /usr/lib/postgresql-9.1/bin For more information do (as postgres user) $ pg_upgrade --help -- Regards, Gregory