Re: Why would queries fail with 'could not stat file' after CLUSTER? - Mailing list pgsql-admin

From Sashbeer Bhandari
Subject Re: Why would queries fail with 'could not stat file' after CLUSTER?
Date
Msg-id CAP7MvVEjJGnfsLjDgEGwo0sFyTY-3dM4BrJsW_MTG+K1FfN8XQ@mail.gmail.com
Whole thread Raw
In response to Why would queries fail with 'could not stat file' after CLUSTER?  (David Schnur <dnschnur@gmail.com>)
Responses Re: Why would queries fail with 'could not stat file' after CLUSTER?  (raghu ram <raghuchennuru@gmail.com>)
Re: Why would queries fail with 'could not stat file' after CLUSTER?  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-admin
Hi
Good Morning,

I am using Postgresql DB 8.2 and my encoding is in SQL_ASCII ,. I want to convert it in UTF8, Please help me it.


Thanks

Sashbeer

On Mon, Apr 9, 2012 at 9:42 PM, David Schnur <dnschnur@gmail.com> wrote:
The software I develop bundles a Postgres 8.3.15 database for storage.  Several users are reporting errors like this:

ProgrammingError: could not stat file "base/16384/52212305.1": Permission denied

I'm unable to reproduce this myself, but it's clearly a real issue.  The response to all previous reports of this that I can find was 'check your permissions'.  I had the user who reported this most recently do that, and can't see any permissions issue.  There is no AV, backup or indexing task that should be accessing the cluster.  The problem appears exclusively on Windows, though that might be a coincidence, since most of our users are on Windows.  A directory listing a few hours after the error shows no file with that name.

Virtually all instances of the problem happen during our weekly maintenance task.  It CLUSTERs about 10-15 tables, then runs various queries, including selecting pg_database_size and selecting reltuples from pg_class, to assess the database's contents.  The errors happen when running these queries; the CLUSTERs themselves always succeed.  Those same queries are run successfully at other times during the week, without the preceding CLUSTERs.

Is this a bug?  How might I collect more information without shipping the user a new build?  The Postgres log, at least at notice level, doesn't appear to show anything more useful than the error message.

Thanks,

David

pgsql-admin by date:

Previous
From: Raghavendra
Date:
Subject: Re: Why would queries fail with 'could not stat file' after CLUSTER?
Next
From: Kiruba suthan
Date:
Subject: Giant Postgresql Database Cluster Folder