PG-软件目录结构

1. 软件目录结构

[postgres@pxc 11]$ ls -l /ups/app/pgsql-11/
total 16
drwxr-xr-x 2 root root 4096 Oct  8 15:06 bin     # 二进制可执行文件,是PG数据库的所有相关命令
drwxr-xr-x 6 root root 4096 Oct  8 15:06 include # 头文件目录
drwxr-xr-x 4 root root 4096 Oct  8 15:06 lib     # 动态库目录,PostgreSQL运行所需要的动态库
drwxr-xr-x 8 root root 4096 Oct  8 15:06 share   # 文档和配置模板文件,拓展插件的SQL文件在此目录下的extension中
[postgres@pxc 11]$

2. 数据目录结构

01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[postgres@pxc 11]$ ls -l ${PGDATA}
total 72
-rw------- 1 postgres postgres   224 backup_label.old      #
drwx------ 5 postgres postgres    41 base                  # 默认表空间的位置
-rw------- 1 postgres postgres    35 current_logfiles      #
drwx------ 2 postgres postgres  4096 global                # 共享系统表的目录
drwx------ 2 postgres postgres   231 log                   # 日志目录
drwx------ 2 postgres postgres     6 pg_commit_ts          #
drwx------ 2 postgres postgres     6 pg_dynshmem           #
-rw------- 1 postgres postgres  4724 pg_hba.conf           # 认证配置文件,配置了已许可的IP主机
-rw------- 1 postgres postgres  1636 pg_ident.conf         # "ident"认证方式的用户映射文件
drwx------ 4 postgres postgres    68 pg_logical            #
drwx------ 4 postgres postgres    36 pg_multixact          #
drwx------ 2 postgres postgres    18 pg_notify             #
drwx------ 2 postgres postgres     6 pg_replslot           #
drwx------ 2 postgres postgres     6 pg_serial             #
drwx------ 2 postgres postgres     6 pg_snapshots          #
drwx------ 2 postgres postgres     6 pg_stat               #
drwx------ 2 postgres postgres     6 pg_stat_tmp           # 统计信息的存储目录
drwx------ 2 postgres postgres    18 pg_subtrans           #
drwx------ 2 postgres postgres    19 pg_tblspc             # 存储用户创建表空间链接文件
drwx------ 2 postgres postgres     6 pg_twophase           # 使用两阶段提交功能时分布式事务的存储目录
-rw------- 1 postgres postgres     3 PG_VERSION            # 软件版本
drwx------ 3 postgres postgres    92 pg_wal                # wal日志存储的目录
drwx------ 2 postgres postgres    18 pg_xact               #
-rw------- 1 postgres postgres   166 postgresql.auto.conf  # 配置文件,使用alter命令配置的参数写入此文件
-rw------- 1 postgres postgres 24044 postgresql.conf       # 实例的主配置文件
-rw------- 1 postgres postgres    66 postmaster.opts       #
-rw------- 1 postgres postgres    99 postmaster.pid        # 主进程PID文件
-rw-r--r-- 1 postgres postgres  5968 recovery.conf         # 从库配置文件,12版本已丢弃
[postgres@pxc 11]$


2.1 控制文件

01
02
03
04
# 控制文件路径
${PGDATA}/global/pg_control
# 查看控制文件内容
${PGHOME}/bin/pg_controldata

clipboard

posted @   KuBee  阅读(376)  评论(0编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· .NET10 - 预览版1新功能体验(一)
点击右上角即可分享
微信分享提示

目录导航