Re: oids on disk not in pg_class - Mailing list pgsql-general

From Guy Rouillier
Subject Re: oids on disk not in pg_class
Date
Msg-id 525351A6.5040107@gmail.com
Whole thread Raw
In response to Re: oids on disk not in pg_class  (David Kerr <dmk@mr-paradox.net>)
List pgsql-general
On 10/7/2013 6:46 PM, David Kerr wrote:
> On Mon, Oct 07, 2013 at 06:32:57PM -0400, Guy Rouillier wrote: - So,
> I ran "select pg_relation_filenode(614804)" and got no results.  Any
> - suggestions on how I can uncover the identify of this node? - -
> Thanks much.
>
> You could try oid2name:
> http://www.postgresql.org/docs/current/static/oid2name.html

David, thanks for the suggestion.  I ran oid2name on all 3 databases in
this PG instance (including postgres) and filenode 614804 is not
reported in any of them.  Judging by the size of the files and the
number of them, I'm pretty sure this is one of our monthly stats tables.
  We record usage stats, keeping a separate table for each month; we
keep just 3 months online because of the size.  I ran cat against the
first file in the series (by date), and the data I could see seems to
confirm that it is a stats table.  Somehow, it has gotten orphaned.

Does the physical file have any useful information (in this scenario) in
the first N bytes, and if so, is there a utility that can print out that
header info?  These huge stats files (about 260 GB per month, including
index) have a single primary key.  I'm guessing that the index files got
orphaned at the same time the data files did; obviously, I'd like to
remove those as well if I can identify which they are.

Thanks.

--
Guy Rouillier


pgsql-general by date:

Previous
From: David Kerr
Date:
Subject: Re: oids on disk not in pg_class
Next
From: "Aftab Ahmed Chandio"
Date:
Subject: postgreSQL query via JDBC in different OS taking different running time?