Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit cf956d5

Browse files
committed
Remove now-redundant description of Postgres file layout, in favor of
referencing the Database File Layout chapter I just added to the main documentation.
1 parent 7f4b5a0 commit cf956d5

File tree

1 file changed

+3
-24
lines changed

1 file changed

+3
-24
lines changed

contrib/oid2name/README.oid2name

+3-24
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,7 @@
11
This utility allows administrators to examine the file structure used by
2-
PostgreSQL.
3-
4-
Databases are placed in directories named after their OIDs in pg_database,
5-
and the table files within a database's directory are named by "filenode"
6-
numbers, which are stored in pg_class.relfilenode.
7-
8-
Note that while a table's filenode often matches its OID, this is *not*
9-
necessarily the case; some operations, like TRUNCATE, REINDEX, CLUSTER
10-
and some forms of ALTER TABLE, can change the filenode while preserving
11-
the OID. Avoid assuming that filenode and table OID are the same.
12-
13-
When a table exceeds 1Gb, it is divided into gigabyte-sized "segments".
14-
The first segment's file name is the same as the filenode; subsequent
15-
segments are named filenode.1, filenode.2, etc.
16-
17-
Tablespaces make the scenario more complicated. Each non-default
18-
tablespace has a symlink inside the pg_tblspc directory, which points to
19-
the physical tablespace directory (as specified in its CREATE TABLESPACE
20-
command). The symlink is named after the tablespace's OID. Inside the
21-
physical tablespace directory there is another directory for each database
22-
that has elements in the tablespace, named after the database's OID.
23-
Tables within that directory follow the filenode naming scheme. The
24-
"pg_default" tablespace is not addressed via pg_tblspc, but corresponds to
25-
$PGDATA/base.
2+
PostgreSQL. To make use of it, you need to be familiar with the file
3+
structure, which is described in the "Database File Layout" chapter of
4+
the "Internals" section of the PostgreSQL documentation.
265

276
Oid2name connects to the database and extracts OID, filenode, and table
287
name information. You can also have it show database OIDs and tablespace

0 commit comments

Comments
 (0)