postgreSql database storage directory

My PostgreSql installation directory is: G:\Apps\PostgreSQL

Database files are stored in: G:\Apps\PostgreSQL\14\data\base

Execute sql to view database information:

select oid, datname from pg_database ; --pg_database table stores information about available databases

The result is as follows: oid corresponds to the folder name in the base directory

Execute SQL to view data table information:

select relname, relower, relfilenode from pg_class; --pg_class table record table and almost everything that has fields or those similar to tables

 The result is as follows: where relfilenode corresponds to the file name under G:\Apps\PostgreSQL\14\data\base

Postgresql system table description can refer to: system table (postgres.cn)

おすすめ

転載: blog.csdn.net/liyayou/article/details/125739509