Re: BUG #12050: Orphaned base files - Mailing list pgsql-bugs

From Jamie Koceniak
Subject Re: BUG #12050: Orphaned base files
Date
Msg-id 84CE67AB46ACDA41B18094177DD0853D2E4C2D@ORD2MBX04C.mex05.mlsrvr.com
Whole thread Raw
In response to Re: BUG #12050: Orphaned base files  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-bugs
Hi Michael,

Thanks for the response. Before I remove those files, I had a couple more q=
uestions.
Does a Postgres system file map to a single pg_class record  and represent =
a single table in Postgres?
In other words, can a PG system file share data across more than 1 table?=20

i.e PG file -> postgres postgres 1073741824 Nov 11 01:56 2602351127

Is it a correct assumption that filename 2602351127 should equal pg_relatio=
n_filenode(oid) within pg_class?
I know there can be 2602351127.1, 2602351127.2 files as well.
2602351127 is missing in pg_class in my case.

It would be a disaster to remove the file thinking it was a table that was =
dropped only to find out some other table has data in that file.

What I am guessing happened here is the table was somehow dropped from syst=
em tables but not the file system.

Thanks!=20

-----Original Message-----
From: Michael Paquier [mailto:michael.paquier@gmail.com]=20
Sent: Tuesday, January 20, 2015 6:59 PM
To: Jamie Koceniak
Cc: Tom Lane; pgsql-bugs@postgresql.org
Subject: Re: [BUGS] BUG #12050: Orphaned base files

On Tue, Jan 20, 2015 at 11:55 AM, Jamie Koceniak <jkoceniak@mediamath.com> =
wrote:
> Is it safe to remove the files /postgresql/9.1/main/base/31858 directory?
The general rule is usually the following if you do not want to corrupt you=
r system: do not mess up manually with those files and let the system manag=
e it. Be sure to at least take file-level backup if you go down this danger=
ous road.
--
Michael

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #12589: Poor randomness from random() with some seeds; poor resolution
Next
From: davividal@gmail.com
Date:
Subject: BUG #12617: DETAIL: Could not read from file "pg_subtrans/06F8" at offset 90112: Success.