PostgreSQL
PostgreSQL Databases
00.体系结构
01.install PostgreSQL 14 for Centos 8.x/7.x
02.PostgreSQL15 Beta1版本在CentOS-Stream-9下的编译安装
03.PostgreSQL 配置文件
0301.postmaster.pid 文件内容分析
0302.postgresql.conf & postgresql.auto.conf
0303.pg_hba.conf
0304.pg_ident.conf
0305.postmaster.opts & PG_VERSION
04.contrib 模块
05.contrib中的dblink插件
06.data storage
07.pageinspect
08.psql
09.PL/pgSQL 函数的三态
10.Index
11.vacuum
12.全文检索
13.PG数据库查询执行
pgquarrel
The Connection Service File
Environment Variables
The Password File
recovery.conf
checkpoint
full_page_write
user/role 对象使用
14.Connection pooling and database caching
pg_hba.conf
PostgreSQL 日志管理
lock
系统字段与多版本并发控制
事务处理与并发控制
分区和继承
partitioning table
INHERITS PARENT TABLE
PostgreSQL14 版本在CentOS-7.6 下的编译安装
从Oracle到PostgreSQL的控制文件
事件触发器
Postgtres OID & CTID
Cluster Management
PostgreSQL 最佳群集高可用性方案
基于patroni+etcd打造可自动故障转移的PostgreSQL集群
PL/Proxy
Citus
01.Single-Node Citus
02.Multi-Node Citus
03.Multi-tenant Applications
04.Real-time Analytics
05.Cluster Management
06.Table Management
00.编译安装 citus
Postgres-XL
01.从源代码编译并安装
02.Postgres-XL 集群动态扩容
03.Postgres-XL性能优化
04.使用haproxy读写负载均衡
Migration
Ora2Pg
mysql2pgsql
Replication
0101.Log-Shipping Standby Servers
0102.Failover
0103.Hot Standby
0104.Asynchronous streaming replication
0105.synchronous streaming replication
0106.replication slot
0107.pg_rewind 修复时间线
0108.Streaming Replication 流复制主备延迟测试
0109.自动主从切换
0201.Logical Replication
0202.Quick Setup
0301.base on trigger -- PostgreSQL general sync and async multi-master replication trigger function
0302.视图和物化视图
Skytools
PGQ
Londiste Tutorial (Skytools 2)
walmgr
Two-node replication mode
londiste 安装部署
Cascade copy mode
Merge replication mode
Setting up Londiste3 replication to partitions
0110.Asynchronous streaming replication to synchronous streaming replication
Monitoring
Postgres Enterprise Manager
归档及日志清理
01.Database Statistics
02.OS level statistics
03.日常维护和检查
Backup and Recovery
EDB BART
02.Barman
崩溃恢复
pg_basebackup
pg_probackup
PgBackRest
Integrations
oracle_fdw
clickhousedb_fdw
pgbench
PostgreSQL 服务器应用
ERROR
使用 pgrpms 制作 postgresql14 rpm 安装包
Highly available
repmgr
Patroni
Greenplum+Kafka 实时数据处理
本文档使用 MrDoc 发布
-
+
home page
Highly available
PostgreSQL是一款功能,性能,可靠性都可以和高端的国外商业数据库相媲美的开源数据库。而且PostgreSQL的许可和生态完全开放,不被任何一个单一的公司或国家所操控,保证了使用者没有后顾之忧。国内越来越多的企业开始用PostgreSQL代替原来昂贵的国外商业数据库。 在部署PostgreSQL到生产环境中时,选择适合的高可用方案是一项必不可少的工作。本文介绍基于Patroni的PostgreSQL高可用的部署方法,供大家参考。 PostgreSQL的开源HA工具有很多种,下面几种算是比较常用的: 1. PGO https://access.crunchydata.com/documentation/postgres-operator/latest/ 1. patroni https://github.com/zalando/patroni 1. stolon https://github.com/sorintlab/stolon 1. repmgr https://github.com/EnterpriseDB/repmgr 1. PAF https://github.com/ClusterLabs/PAF 1. pglookout https://github.com/aiven/pglookout 1. pgpool https://www.pgpool.net/docs/latest/en/html/intro-whatis.html 1. PAF(PostgreSQL Automatic Failomianver) 官文 https://www.postgresql.org/docs/9.5/high-availability.html patroni和pg_auto_failover以及他们的差异: https://cloud.google.com/architecture/architectures-high-availability-postgresql-clusters-compute-engine 它们的比较可以参考: https://scalegrid.io/blog/managing-high-availability-in-postgresql-part-1/ 其中Patroni不仅简单易用而且功能非常强大。 - 支持自动failover和按需switchover - 支持一个和多个备节点 - 支持级联复制 - 支持同步复制,异步复制 - 支持同步复制下备库故障时自动降级为异步复制(功效类似于MySQL的半同步,但是更加智能) - 支持控制指定节点是否参与选主,是否参与负载均衡以及是否可以成为同步备机 - 支持通过pg_rewind自动修复旧主 - 支持多种方式初始化集群和重建备机,包括pg_basebackup和支持wal_e,pgBackRest,barman等备份工具的自定义脚本 - 支持自定义外部callback脚本 - 支持REST API支持通过watchdog防止脑裂 - 支持k8s,docker等容器化环境部署 - 支持多种常见DCS(Distributed Configuration Store)存储元数据,包括etcd,ZooKeeper,Consul,Kubernetes 因此,除非只有2台机器没有多余机器部署DCS的情况,Patroni是一款非常值得推荐的PostgreSQL高可用工具。下面将详细介绍基于Patroni搭建PostgreSQL高可用环境的步骤。
Seven
March 12, 2023, 11:44 a.m.
转发文档
Collection documents
Last
Next
手机扫码
Copy link
手机扫一扫转发分享
Copy link
Markdown文件
share
link
type
password
Update password