Large and Growing Group of Files

Started by John Iliffeabout 9 years ago4 messagesgeneral
Jump to latest
#1John Iliffe
john.iliffe@iliffe.ca

Can anybody tell what these files are and what they do, and more importantly
if they are needed?

This database has been in use since about 2012 on PostgreSQL 9.2 and is
quite active. (both read and insert/change). There seems to be one group
of these files a week, total 316 files as of today. I have truncated the
list because all the names are just 5 digit numbers, with every so often a
_fsm or _vm extension. They are all in a subdirectory called
PG_9.2_201204301/16385.

----------------------------------------
[root@prod03 usr]# ls -al /usr/pgsql_tablespaces/PG_9.2_201204301/16385 |
wc -l
316
----------------------------------------

...... tail end of list.....
-rw------- 1 postgres postgres 16384 Feb 28 19:07 16479
-rw------- 1 postgres postgres 90112 Mar 13 14:11 16480
-rw------- 1 postgres postgres 114688 Mar 13 18:27 16481
-rw------- 1 postgres postgres 98304 Mar 13 14:11 16482
-rw------- 1 postgres postgres 81920 Mar 13 14:11 16483
-rw------- 1 postgres postgres 90112 Mar 13 14:11 16484
-rw------- 1 postgres postgres 32768 Jun 10 2016 16485
-rw------- 1 postgres postgres 57344 Sep 22 2015 16486
-rw------- 1 postgres postgres 8192 Feb 24 17:00 16527
-rw------- 1 postgres postgres 16384 Feb 26 17:36 16529
-rw------- 1 postgres postgres 24576 Apr 4 2016 16529_fsm
-rw------- 1 postgres postgres 8192 Dec 29 2013 16529_vm
-rw------- 1 postgres postgres 16384 Feb 24 17:00 16533
-rw------- 1 postgres postgres 512 Jan 6 2013 pg_filenode.map
-rw------- 1 postgres postgres 111220 Jan 17 19:33 pg_internal.init
-rw------- 1 postgres postgres 4 Jan 6 2013 PG_VERSION

----------------------------------------

I have never looked in depth at the database files before; just did it now
because I'm working on building a new server!

Regards,

John
======================================

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: John Iliffe (#1)
Re: Large and Growing Group of Files

John Iliffe <john.iliffe@iliffe.ca> writes:

Can anybody tell what these files are and what they do, and more importantly
if they are needed?

They are database table files, and you will certainly be unhappy if you
just manually rm them.

You can read some theory here:

https://www.postgresql.org/docs/9.2/static/storage.html

and for help in identifying specific files you might like oid2name:

https://www.postgresql.org/docs/9.2/static/oid2name.html

although it's certainly possible to get the same results with manual
queries on the system catalogs.

regards, tom lane

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

#3David G. Johnston
david.g.johnston@gmail.com
In reply to: Tom Lane (#2)
Re: Large and Growing Group of Files

On Mon, Mar 13, 2017 at 4:12 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:

John Iliffe <john.iliffe@iliffe.ca> writes:

Can anybody tell what these files are and what they do, and more

importantly

if they are needed?

They are database table files, and you will certainly be unhappy if you
just manually rm them.

You can read some theory here:

https://www.postgresql.org/docs/9.2/static/storage.html

​In particular note the paragraph whose leading sentence is:

"​Tablespaces make the scenario more complicated."

What you showed up was the "far end" of a custom tablespace link.

David J.

#4John Iliffe
john.iliffe@iliffe.ca
In reply to: Tom Lane (#2)
Re: Large and Growing Group of Files

On Monday 13 March 2017 19:12:10 Tom Lane wrote:

John Iliffe <john.iliffe@iliffe.ca> writes:

Can anybody tell what these files are and what they do, and more
importantly if they are needed?

They are database table files, and you will certainly be unhappy if you
just manually rm them.

You can read some theory here:

https://www.postgresql.org/docs/9.2/static/storage.html

and for help in identifying specific files you might like oid2name:

https://www.postgresql.org/docs/9.2/static/oid2name.html

although it's certainly possible to get the same results with manual
queries on the system catalogs.

regards, tom lane

Thanks Tom.

I was sure they weren't abandoned but the increasing number of them made me
wonder if I had a configuration issue.

John

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general