BUG #12050: Orphaned base files

From: jkoceniak(at)mediamath(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #12050: Orphaned base files
Date: 2014-11-24 20:18:15
Message-ID: 20141124201815.15509.290@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 12050
Logged by: Jamie K
Email address: jkoceniak(at)mediamath(dot)com
PostgreSQL version: 9.1.14
Operating system: Debian GNU/Linux 7
Description:

I have identified a number of tables that were dropped in the db but the
files still remain under /9.1/main/base/.

How do I go about verifying this is true and how do I clean this up so I can
reclaim the disk space?

I checked in the pg_class table but none of the objects exist.

For example,
# SELECT pg_relation_filepath(oid) FROM pg_class WHERE
pg_relation_filepath(oid) like '%2601708994%';
pg_relation_filepath
----------------------
(0 rows)

Here is an example table under /9.1/main/base/ but not in pg_class anymore:

-rw------- 1 postgres postgres 1073741824 Nov 10 22:51 2601708994
-rw------- 1 postgres postgres 1073741824 Nov 10 22:51 2601708994.1
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.10
-rw------- 1 postgres postgres 231424000 Nov 10 22:52 2601708994.11
-rw------- 1 postgres postgres 1073741824 Nov 10 22:51 2601708994.2
-rw------- 1 postgres postgres 1073741824 Nov 10 22:51 2601708994.3
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.4
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.5
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.6
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.7
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.8
-rw------- 1 postgres postgres 1073741824 Nov 10 22:52 2601708994.9
-rw------- 1 postgres postgres 2981888 Nov 10 21:17 2601708994_fsm

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Michael Paquier 2014-11-25 00:04:28 Re: function length(numeric) does not exist
Previous Message Tom Lane 2014-11-24 18:57:11 Re: BUG #12046: lower_inf('(-infinity, today)'::tsrange) returns false