服务端启动异常

异常原因:数据库无法连接
数据库地址:192.168.2.222:5432
配置目录:/config 读写权限正常
数据库目录:/config/pgsql

请参考官网解决方法https://mtmt.tech/docs/advanced/ifix

Debug信息:

# id postgres

uid=103(postgres) gid=105(postgres) groups=105(postgres),103(ssl-cert)

# stat /config/pgsql

  File: /config/pgsql
  Size: 26        	Blocks: 0          IO Block: 4096   directory
Device: 2fh/47d	Inode: 12666373954411176  Links: 1
Access: (0700/drwx------)  Uid: (  103/postgres)   Gid: (  105/postgres)
Access: 2026-01-02 12:16:03.623358285 +0800
Modify: 2024-05-01 16:27:52.630285100 +0800
Change: 2026-01-02 12:29:14.976380755 +0800
 Birth: -

请根据 下方红色 提示,检查 上方Debug信息 中,uid是否一致,以及Access是否为0700

# id postgres

uid=103(postgres) gid=105(postgres) ...

# stat /config/pgsql

Access: (0700/drwx------) Uid: ( 103/postgres) Gid: ( 105/postgres)

如果Debug信息中的目录权限没问题
请查看数据库最新的日志 /config/pgsql/serverlog
寻找FATALPANIC开头的日志;

# cat /config/pgsql/serverlog

2026-06-21 11:34:17.643 CST [35] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
2026-06-21 11:34:17.644 CST [37] LOG:  shutting down
2026-06-21 11:34:17.674 CST [35] LOG:  database system is shut down
2026-06-21 11:34:18.919 CST [35] LOG:  starting PostgreSQL 14.12 (Debian 14.12-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2026-06-21 11:34:18.919 CST [35] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-06-21 11:34:18.919 CST [35] LOG:  listening on IPv6 address "::", port 5432
2026-06-21 11:34:18.935 CST [35] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2026-06-21 11:34:18.956 CST [36] LOG:  database system was shut down at 2026-06-21 11:34:17 CST
2026-06-21 11:34:18.968 CST [35] LOG:  database system is ready to accept connections
2026-06-25 10:04:55.491 CST [35] LOG:  received fast shutdown request
2026-06-25 10:04:55.495 CST [35] LOG:  aborting any active transactions
2026-06-25 10:04:55.548 CST [35] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
2026-06-25 10:04:55.550 CST [37] LOG:  shutting down
2026-06-25 10:04:55.589 CST [35] LOG:  database system is shut down
2026-06-25 13:20:10.858 CST [35] LOG:  starting PostgreSQL 14.12 (Debian 14.12-1.pgdg110+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 10.2.1-6) 10.2.1 20210110, 64-bit
2026-06-25 13:20:10.862 CST [35] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2026-06-25 13:20:10.863 CST [35] LOG:  listening on IPv6 address "::", port 5432
2026-06-25 13:20:10.885 CST [35] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2026-06-25 13:20:10.926 CST [36] LOG:  database system was shut down at 2026-06-25 10:04:55 CST
2026-06-25 13:20:10.949 CST [35] LOG:  database system is ready to accept connections