07 2023 档案
摘要:https://www.hyouit.com?aff=418 1、逻辑备份恢复 pg_dump/pg_restore 命令备份恢复 对数据库或表备份恢复 ## 备份指定的数据库 test $ pg_dump -U postgres -W -h 192.168.3.122 -p 1921 test >
阅读全文
摘要:查看控制文件内容 ``` shell $ pg_controldata pg_control version number: 1201 Catalog version number: 201909212 Database system identifier: 7253057961538375212
阅读全文
摘要:##### 1、体系结构 体系结构主要由实例和存储结构组成,而实例由进程和内存结构组成;存储结构分为逻辑存储结构和物理存储结构。 ##### 2、进程结构 查看运行进程信息 ``` shell $ ps -ef | grep postgre postgres 1161 1 0 15:10 ? 00:
阅读全文
摘要:##### 1、连接数据库 远程连接 ``` shell $ psql -U postgres -h 192.168.3.105 -d postgres -p 1921 -W ``` 允许远程连接需要配置以下两个配置 配置监听地址 ``` shell $ vim /pgdata/postgresql
阅读全文
摘要:https://www.hyouit.com?aff=418 1、初始化系统配置 # useradd -d /opt/postgres postgres # yum groupinstall -y "Development Tools" "Legacy UNIX Compatibility" -y
阅读全文