Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLG9q-0001RL-Mt for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jul 2016 20:44:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLG9p-0003GI-2Z for pgsql-bugs@arkaria.postgresql.org; Thu, 07 Jul 2016 20:44:25 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLG9o-0003Df-45 for pgsql-bugs@postgresql.org; Thu, 07 Jul 2016 20:44:24 +0000 Received: from mimolette.dalibo.net ([212.85.157.144] helo=mail.dalibo.com) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLG9l-00037h-8h for pgsql-bugs@postgresql.org; Thu, 07 Jul 2016 20:44:22 +0000 Received: from [192.168.0.6] (aur75-1-78-192-238-147.fbxo.proxad.net [78.192.238.147]) by mail.dalibo.com (Postfix) with ESMTPSA id E8C352C2FE9; Thu, 7 Jul 2016 22:44:18 +0200 (CEST) Subject: Re: BUG #14233: getting the size if the database failing with permission denied error To: ssatyasrinivas@gmail.com, pgsql-bugs@postgresql.org References: <20160707150137.1418.26662@wrigleys.postgresql.org> From: Julien Rouhaud Message-ID: Date: Thu, 7 Jul 2016 22:44:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160707150137.1418.26662@wrigleys.postgresql.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 07/07/2016 17:01, ssatyasrinivas@gmail.com wrote: > The following bug has been logged on the website: > > Bug reference: 14233 > Logged by: Satya Sunkara > Email address: ssatyasrinivas@gmail.com > PostgreSQL version: 9.2.9 > Operating system: windows > Description: > > when we do the backup, we do query the DB for size and name using following > select statement: > > select p.datname,pg_database_size(p.datname) from pg_database p > > This query is throws error: > > PQresultStatus indicates failure for select > p.datname,pg_database_size(p.datname) from pg_database p. Error:ERROR: > could not stat file "base/95821/272574": Permission denied > > Is there any resolution for this? > This is not a bug, such a question should be sent on a mailing list like pgsql-general. Your problem is that the system user running the cluster (probably "postgres") doesn't have access on this file anymore. You should investigate why and how file permission has been changed, and restore the regular permissions. -- Julien Rouhaud http://dalibo.com - http://dalibo.org -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs