1.2 Physiacel Structure of Database Cluster

kakaxi9521發表於2021-07-06

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目錄,具體結構可看下圖:



參考文件:

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/21374452/viewspace-2779888/,如需轉載,請註明出處,否則將追究法律責任。

相關文章