Postgresql 9.3 Centos Structure

Asked

Viewed 141 times

3

I would like to know what is and what is part of this directory groundwork.

/var/lib/pgsql/9.3/data/base/17500/18037

/var/lib/pgsql/9.3/data/base/17500/18170

/var/lib/pgsql/9.3/data/base/17500/18168

/var/lib/pgsql/9.3/data/base/17500/18169

/var/lib/pgsql/9.3/data/base/17500/17614.1

/var/lib/pgsql/9.3/data/base/17500/17614

1 answer

2


According to the documentation, /var/lib/pgsql/data is the grouping data directory where the data required for a grouping of databases is stored, usually referred to as PGDATA, due to the name of the environment variable that can be used to define it. This directory contains several subdirectories and control files, such as the pg_database and postgresql.conf.

The Subdirectory groundwork contains subdirectories per database, for each database of the grouping there is a subdirectory within PGDATA/basis, with the name corresponding to OID of the database in pg_database. This subdirectory is the default location for the database files, in particular, the database system catalogs are stored in this subdirectory. Each table and index is stored in a separate file, with name corresponding to the number of the filenode table or index, which can be found in pg_class.relfilenode.

When a table or index exceeds 1Gb, it is divided into segments up to 1 Gb. The name of the first segment file is the same as the filenode, subsequent files are called filenode.1, filenode.2, for example 17614.1. This organization avoids problems on platforms that have file size limitation.

  • Thank you very much Qmechanic73 .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.