1.2. Physical Structure of Database Cluster
A database cluster basically is one directory referred to as base directory, and it contains some subdirectories and lots of files. If you execute the
initdb utility to initialize a new database cluster, a base directory will be created under the specified directory. Though it is not compulsory, the path of the base directory is usually set to the environment variable PGDATA.Figure 1.2 shows an example of database cluster in PostgreSQL. A database is a subdirectory under the base subdirectory, and each of the tables and indexes is (at least) one file stored under the subdirectory of the database to which it belongs. Also there are several subdirectories containing particular data, and configuration files. While PostgreSQL supports tablespaces, the meaning of the term is different from other RDBMS. A tablespace in PostgreSQL is one directory that contains some data outside of the base directory.
当使用initdb 工具初始化一个新的数据库集群时会创建base目录,具体结构可看下图:
参考文档:http://www.interdb.jp/pg/pgsql01.html
