9. 百花齐放:使用不同风味的 PG 内核分支

本章为 AI 生成的头脑风暴草稿目录,尚未编写,请务必注意。

章节概述

PostgreSQL 生态系统不仅仅是一个数据库,而是一个庞大的"数据库内核家族"。正如 Linux 内核衍生出众多发行版一样,PostgreSQL 也孕育了众多特色鲜明的分支与变体。本章将深入探讨 PostgreSQL 生态中的各种内核分支,了解它们的特性、应用场景和使用方式。

一、PostgreSQL 内核生态概览

1.1 为什么会有这么多 PostgreSQL 分支?

  • PostgreSQL 的开放架构与扩展性
  • 不同应用场景的专门优化需求
  • 商业与开源社区的双重驱动
  • 云原生时代的新挑战与机遇

1.2 PostgreSQL 分支的分类体系

  • 原生扩展型:基于扩展机制的功能增强(如 Citus、TimescaleDB)
  • 协议兼容型:提供其他数据库的兼容层(如 Babelfish、IvorySQL、FerretDB)
  • 架构改进型:深度修改内核架构(如 OrioleDB、PolarDB)
  • 云原生型:为云环境特别优化(如 Aurora、AlloyDB)
  • 垂直领域型:针对特定场景优化(如 Greenplum、TimescaleDB)

1.3 选择 PostgreSQL 分支的决策框架

  • 评估业务需求与技术匹配度
  • 考虑迁移成本与兼容性
  • 评估社区活跃度与长期支持
  • 性能、可扩展性与成本的权衡

二、分布式与水平扩展

2.1 Citus - 原生分布式扩展

  • 核心概念
    • 分片(Sharding)架构设计
    • 协调节点与工作节点
    • 分布式表与引用表
    • 共置(Co-location)策略
  • 应用场景
    • 多租户 SaaS 应用
    • 实时分析与 HTAP
    • 高吞吐量 OLTP
  • 动手实验
    • 使用 Docker Compose 搭建 Citus 集群
    • 创建分布式表与数据分片
    • 实现多租户应用架构
    • 分布式查询优化实践

2.2 Greenplum - MPP 数据仓库

  • 架构特点
    • Shared-Nothing MPP 架构
    • 段数据库(Segment)设计
    • 并行查询执行引擎
    • 数据分布策略
  • 最佳实践
    • 数据加载与 ETL 优化
    • 分区表设计
    • 查询优化技巧
    • 资源管理与工作负载管理

2.3 YugabyteDB - 分布式 SQL

  • 技术特性
    • Google Spanner 架构启发
    • YSQL 与 PostgreSQL 兼容性
    • 分布式 ACID 事务
    • 自动分片与负载均衡
  • 部署与运维
    • 多区域部署策略
    • 一致性级别配置
    • 故障恢复与高可用

三、数据库兼容层

3.1 Babelfish/WiltonDB - SQL Server 兼容

  • 兼容性特性
    • T-SQL 语法支持
    • TDS 协议实现
    • 存储过程与触发器
    • SQL Server 函数库
  • 迁移指南
    • 兼容性评估工具
    • 迁移步骤与最佳实践
    • 常见不兼容问题处理
  • 动手实验
    • 从 SQL Server 迁移示例应用
    • T-SQL 存储过程移植
    • 性能对比测试

3.2 IvorySQL - Oracle 兼容

  • Oracle 兼容特性
    • PL/SQL 支持
    • Oracle 语法兼容
    • 包(Package)支持
    • Oracle 函数与系统表
  • 企业级特性
    • 分区表增强
    • 审计功能
    • 资源管理
  • 迁移实践
    • Oracle 到 IvorySQL 迁移工具
    • PL/SQL 代码转换
    • 性能调优指南

3.3 FerretDB - MongoDB 兼容

  • MongoDB 协议支持
    • Wire Protocol 实现
    • BSON 文档存储
    • MongoDB API 兼容性
    • 聚合管道支持
  • 架构设计
    • PostgreSQL 作为存储后端
    • 文档到关系模型映射
    • 索引策略
  • 使用场景
    • MongoDB 应用迁移
    • 混合工作负载
    • 文档存储需求

3.4 OpenHalo - MySQL 兼容

  • MySQL 协议兼容
    • MySQL Wire Protocol
    • MySQL 客户端支持
    • SQL 语法兼容性
  • 迁移优势
    • 从 MySQL 无缝迁移
    • 保留应用兼容性
    • 获得 PostgreSQL 高级特性

四、性能优化型分支

4.1 OrioleDB - 云原生存储引擎

  • 革命性特性
    • 解决 XID 回卷问题
    • 消除表膨胀
    • 4倍性能提升
    • 存算分离架构
  • 技术创新
    • 新的存储格式
    • MVCC 实现改进
    • 云存储优化
  • 动手实验
    • OrioleDB 安装与配置
    • 性能基准测试
    • 与原生 PostgreSQL 对比

4.2 PolarDB - Aurora 式架构

  • 架构特点
    • 共享存储架构
    • 计算存储分离
    • 快速故障恢复
    • 读写分离与读扩展
  • 关键技术
    • LogIndex 技术
    • PolarFS 分布式文件系统
    • 内存池化技术
  • 部署实践
    • PolarDB 集群搭建
    • 性能测试与优化
    • 高可用配置

4.3 Percona PostgreSQL - 企业增强

  • 企业特性
    • 透明数据加密(TDE)
    • 审计日志增强
    • 性能监控改进
    • 备份恢复增强
  • 安全特性
    • pg_tde 扩展使用
    • 密钥管理
    • 合规性支持

五、云服务提供商分支

5.1 Amazon Aurora PostgreSQL

  • Aurora 特性
    • 6路复制存储
    • 快速克隆
    • 回溯(Backtrack)
    • 全球数据库
  • 性能优化
    • 并行查询
    • 快速 DDL
    • 智能读写分离

5.2 Google AlloyDB

  • 技术创新
    • 列式引擎加速
    • 机器学习优化
    • 自动索引推荐
    • PostgreSQL 完全兼容
  • 性能特性
    • 4倍于标准 PostgreSQL 性能
    • 100倍分析查询加速
    • 智能缓存

5.3 Azure Database for PostgreSQL

  • 服务层级
    • 单一服务器
    • 灵活服务器
    • Hyperscale (Citus)
  • 企业特性
    • 智能性能
    • 高可用配置
    • 安全与合规

六、应用平台型

6.1 Supabase - Backend as a Service

  • 平台特性
    • 实时 API
    • 认证服务
    • 存储服务
    • Edge Functions
  • 开发体验
    • 自动 API 生成
    • 实时订阅
    • Row Level Security
  • 动手实验
    • 搭建 Supabase 实例
    • 构建实时应用
    • 集成认证与存储

6.2 TimescaleDB - 时序数据库

  • 时序特性
    • 超表(Hypertables)
    • 自动分区
    • 连续聚合
    • 数据保留策略
  • 使用场景
    • IoT 数据存储
    • 监控指标
    • 金融时序数据
  • 最佳实践
    • 模式设计
    • 查询优化
    • 数据压缩

七、Pigsty 集成实践

7.1 Pigsty 内核家族

  • 支持的内核列表与特性矩阵
  • 统一的部署与管理接口
  • 监控与可观测性集成

7.2 内核切换与共存

  • 多内核部署策略
  • 内核版本管理
  • 平滑迁移方案

7.3 生产环境最佳实践

  • 内核选择决策树
  • 性能调优指南
  • 故障排查手册

八、动手实验项目

实验 1:搭建 Citus 分布式集群

  • 环境准备与集群初始化
  • 创建分布式表
  • 执行分布式查询
  • 性能测试与优化

实验 2:SQL Server 到 Babelfish 迁移

  • 评估应用兼容性
  • 迁移数据库对象
  • 测试应用功能
  • 性能对比分析

实验 3:使用 OrioleDB 提升 OLTP 性能

  • 安装配置 OrioleDB
  • 基准测试对比
  • 分析性能提升原因
  • 生产环境评估

实验 4:构建多租户 SaaS 应用

  • 使用 Citus 实现数据隔离
  • 设计多租户架构
  • 实现租户路由
  • 性能与扩展性测试

实验 5:时序数据处理

  • TimescaleDB 安装配置
  • 设计时序数据模型
  • 实现连续聚合
  • 数据压缩与归档

九、选型决策指南

9.1 技术评估维度

  • 功能完整性
  • 性能指标
  • 可扩展性
  • 运维复杂度
  • 社区支持
  • 许可与成本

9.2 典型场景推荐

  • OLTP 高并发:OrioleDB、原生 PostgreSQL
  • OLAP 数据仓库:Greenplum、Citus
  • 多租户 SaaS:Citus
  • 时序数据:TimescaleDB
  • 数据库迁移:Babelfish(SQL Server)、IvorySQL(Oracle)、FerretDB(MongoDB)
  • 云原生部署:Aurora、AlloyDB、PolarDB
  • 快速开发:Supabase

9.3 迁移路径规划

  • 评估现有系统
  • 选择目标分支
  • 制定迁移计划
  • 测试验证
  • 逐步切换

十、未来展望

10.1 PostgreSQL 内核发展趋势

  • 云原生架构演进
  • 存算分离成为主流
  • AI/ML 集成增强
  • 协议兼容性扩展

10.2 新兴技术方向

  • Serverless PostgreSQL
  • 向量数据库能力
  • 分布式事务优化
  • 自动化运维

10.3 生态系统演化

  • PostgreSQL 成为数据库"Linux内核"
  • 垂直领域专门化
  • 云服务商竞争格局
  • 开源社区协作模式

参考文献

Pigsty 相关资源

  1. Pigsty 官方文档 - https://pigsty.io/docs/
  2. Pigsty 内核支持 - http://doc.pgsty.com/pgsql/kernel
  3. Pigsty 中文文档 - http://www.pigsty.cc/
  4. Pigsty GitHub - https://github.com/pgsty/pigsty
  5. Pigsty v3.4 发布:支持 MySQL 兼容 - https://www.postgresql.org/about/news/pigsty-v34-released-pg-rds-with-mysql-compatibility-3052/
  6. Pigsty v3.6 元发行版 - https://www.postgresql.org/about/news/pigsty-36-the-meta-distribution-for-postgresql-3111/

Citus 分布式 PostgreSQL

  1. Citus 官方网站 - https://www.citusdata.com/
  2. Citus GitHub - https://github.com/citusdata/citus
  3. Citus 快速入门 - https://www.citusdata.com/getting-started/
  4. Citus 架构文档 - https://docs.citusdata.com/en/v7.0/aboutcitus/introduction_to_citus.html
  5. Citus 学术论文 - https://dl.acm.org/doi/10.1145/3448016.3457551
  6. Citus 水平扩展架构 - https://demirhuseyinn-94.medium.com/scaling-horizontally-on-postgresql-cituss-impact-on-database-architecture-295329c72c62
  7. Azure Hyperscale (Citus) - https://learn.microsoft.com/zh-cn/azure/postgresql/tutorial-hyperscale-shard
  8. 使用 Citus 构建多租户应用 - https://www.cnblogs.com/hacker-linner/p/16007495.html
  9. 从 Citus 深度解密分布式数据库 - https://developer.aliyun.com/article/982383
  10. Citus 官方快速入门教程 - https://mp.weixin.qq.com/s/c65NK3eK0RSNzRgTWnJnMA

Babelfish/WiltonDB (SQL Server 兼容)

  1. Babelfish 官网 - https://babelfishpg.org/
  2. AWS Babelfish for Aurora - https://aws.amazon.com/rds/aurora/babelfish/
  3. Babelfish 软件架构 - https://babelfishpg.org/docs/internals/software-architecture/
  4. Babelfish 兼容性指南 - https://babelfishpg.org/docs/usage/limitations-of-babelfish/
  5. Babelfish FAQ - https://babelfishpg.org/docs/faq/
  6. AWS Babelfish 兼容性差异 - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/babelfish-compatibility.html
  7. PostgreSQL 新闻:Babelfish 发布 - https://www.postgresql.org/about/news/babelfish-for-postgresql-2340/
  8. Babelfish: 连接 PostgreSQL 和 SQL Server - https://medium.com/@josephsims1/babelfish-bridging-postgresql-and-sql-server-59a5e3cd0152

IvorySQL (Oracle 兼容)

  1. IvorySQL GitHub - https://github.com/IvorySQL/IvorySQL
  2. IvorySQL 4.0 发布 - https://www.postgresql.org/about/news/announce-ivorysql-40-released-enhanced-oracle-compatibility-with-postgresql-170-foundation-2987/
  3. IvorySQL 4.4 发布 - https://www.postgresql.org/about/news/ivorysql-44-released-based-on-postgresql-174-with-enhanced-platform-support-3037/
  4. IvorySQL 3.4 发布 - https://www.postgresql.org/about/news/announcing-ivorysql-34-postgresql-164-support-with-oracle-compatibility-2941/
  5. IvorySQL Oracle 兼容性测试 - https://dev.to/yugabyte/ivorysql-ive-tested-some-oracle-postgresql-compatibility-of-version-21-14de
  6. Pigsty 中的 IvorySQL - https://pigsty.io/docs/kernel/ivorysql/

OpenHalo (MySQL 兼容)

  1. OpenHalo 官网 - https://www.openhalo.org
  2. OpenHalo GitHub - https://github.com/HaloTech-Co-Ltd/openHalo
  3. OpenHalo 项目发布 - https://www.postgresql.org/about/news/openhalo-project-is-now-released-3048/
  4. Pigsty 集成 OpenHalo - https://pigsty.io/docs/kernel/halo/
  5. Hacker News 讨论 - https://news.ycombinator.com/item?id=43545446

OrioleDB (云原生存储引擎)

  1. OrioleDB 官网 - https://www.orioledb.com/
  2. OrioleDB 文档 - https://www.orioledb.com/docs
  3. OrioleDB 快速开始 - https://www.orioledb.com/docs/usage/getting-started
  4. OrioleDB GitHub - https://github.com/orioledb/orioledb
  5. OrioleDB Docker 镜像 - https://hub.docker.com/r/orioledb/orioledb
  6. Supabase OrioleDB 集成 - https://supabase.com/docs/guides/database/orioledb
  7. OrioleDB 来了!4倍性能,零膨胀,存算分离 - https://pigsty.io/blog/pg/orioledb-is-coming/

PolarDB (Aurora 式架构)

  1. PolarDB GitHub - https://github.com/ApsaraDB/PolarDB-for-PostgreSQL
  2. PolarDB 文档 - https://apsaradb.github.io/PolarDB-for-PostgreSQL/
  3. 阿里云 PolarDB - https://www.alibabacloud.com/product/polardb-for-postgresql
  4. PolarDB 的力量 - https://then-arifin.medium.com/the-power-of-alibaba-cloud-polardb-1e3b7e6fcd7f
  5. PolarDB RAC 测试 - https://www.alibabacloud.com/blog/599421
  6. 什么是 PolarDB - https://www.alibabacloud.com/blog/what-is-polardb-for-postgresql_599350
  7. PolarDB VLDB 论文 - https://www.vldb.org/pvldb/vol16/p3754-chen.pdf
  8. Pigsty 中的 PolarDB - https://pigsty.io/docs/kernel/polardb/

Percona PostgreSQL

  1. Percona pg_tde 文档 - https://docs.percona.com/pg-tde/
  2. pg_tde GitHub 文档 - https://percona.github.io/pg_tde/
  3. pg_tde GitHub 仓库 - https://github.com/percona/pg_tde
  4. pg_tde 发布说明 - https://percona.github.io/pg_tde/main/release-notes/release-notes.html
  5. 使用 pg_tde 保护数据库 - https://www.percona.com/blog/protect-your-postgresql-database-with-pg_tde-safe-and-secure/
  6. Kubernetes 上的 PostgreSQL 加密 - https://www.percona.com/blog/encrypt-postgresql-data-at-rest-on-kubernetes/
  7. 透明数据加密测试版 - https://www.percona.com/blog/open-source-postgresql-pg-tde-beta/
  8. 添加透明数据加密到 PostgreSQL - https://www.percona.com/blog/adding-transparent-data-encryption-to-postgresql-with-pg_tde-please-test/

FerretDB (MongoDB 兼容)

  1. FerretDB 文档 - https://docs.ferretdb.io/
  2. FerretDB 官网 - https://www.ferretdb.com/
  3. FerretDB GitHub - https://github.com/FerretDB/FerretDB
  4. FerretDB 2.0 发布 - https://blog.ferretdb.io/ferretdb-releases-v2-faster-more-compatible-mongodb-alternative/
  5. FerretDB 2.0:开源 MongoDB 替代 - https://thenewstack.io/ferretdb-2-0-open-source-mongodb-alternative-with-postgresql-power/
  6. InfoQ:FerretDB 2.0 发布 - https://www.infoq.com/news/2025/02/ferretdb-documentdb/
  7. 使用 FerretDB 与 PostgreSQL - https://www.instaclustr.com/blog/ferretdb-with-postgresql/
  8. Supabase 集成 FerretDB - https://supabase.com/blog/nosql-mongodb-compatibility-with-ferretdb-and-flydotio
  9. Percona 集成 FerretDB - https://docs.percona.com/ivee/services/ferretdb.html
  10. FerretDB:真正可用的 MongoDB 替代 - https://medevel.com/ferretdb/

Supabase (BaaS 平台)

  1. Supabase 文档 - https://supabase.com/docs
  2. Supabase 数据库文档 - https://supabase.com/docs/guides/database/overview
  3. Supabase 连接 PostgreSQL - https://supabase.com/docs/guides/database/connecting-to-postgres
  4. Supabase API 文档 - https://supabase.com/docs/guides/api
  5. Supabase 功能概览 - https://supabase.com/docs/guides/getting-started/features
  6. Supabase Edge Functions - https://supabase.com/docs/guides/functions/connect-to-postgres
  7. Supabase 官网 - https://supabase.com/
  8. Supabase 数据库特性 - https://supabase.com/database
  9. Supabase BaaS 平台概述 - https://medium.com/@engrshul/overview-of-supabase-backend-as-a-service-platform-e192da9a369c

TimescaleDB (时序数据库)

  1. TimescaleDB GitHub - https://github.com/timescale/timescaledb
  2. TigerData 文档 - https://docs.tigerdata.com/
  3. Supabase TimescaleDB 集成 - https://supabase.com/docs/guides/database/extensions/timescaledb
  4. Scalingo TimescaleDB 指南 - https://doc.scalingo.com/databases/postgresql/guides/timescaledb
  5. 使用 TimescaleDB 管理时序数据 - https://ozwizard.medium.com/managing-time-series-data-using-timescaledb-on-postgres-3752654252d0
  6. TimescaleDB 与 PostgreSQL 时序数据 - https://medium.com/@tihomir.manushev/time-series-data-with-timescaledb-and-postgresql-3ac9127db90c
  7. 启用 TimescaleDB - https://severalnines.com/blog/how-enable-timescaledb-existing-postgresql-database/
  8. Percona:使用 TimescaleDB 管理时序数据 - https://www.percona.com/blog/managing-time-series-data-using-timescaledb-powered-postgresql/
  9. TimescaleDB vs PostgreSQL - https://github.com/timescale/docs.timescale.com-content/blob/master/introduction/timescaledb-vs-postgres.md

Greenplum (MPP 数据仓库)

  1. VMware Tanzu Greenplum - https://techdocs.broadcom.com/us/en/vmware-tanzu/data-solutions/tanzu-greenplum/7/greenplum-database/admin_guide-intro-arch_overview.html
  2. Pivotal Greenplum 文档 - https://gpdb.docs.pivotal.io/6-2/admin_guide/intro/arch_overview.html
  3. VMware Greenplum 分析概览 - https://docs.vmware.com/en/VMware-Tanzu-Greenplum/6/greenplum-database/GUID-analytics-overview.html
  4. 什么是 Greenplum 数据库 - https://scalegrid.io/blog/what-is-greenplum-database/
  5. Greenplum A-Z 架构指南 - https://medium.com/@payalchauhan/a-to-z-about-greenplum-starting-from-architecture-ae6c5943c675
  6. Greenplum 数据仓库介绍 - https://www.oreilly.com/library/view/data-warehousing-with/9781491983539/ch01.html
  7. PgConf.Russia 2019:Greenplum MPP 架构 - https://pgconf.ru/en/2019/242278
  8. Greenplum 内部结构 - https://pgconf.ru/en/talk/1588573
  9. Greenplum Wikipedia - https://en.wikipedia.org/wiki/Greenplum
  10. CelerData Greenplum 术语 - https://celerdata.com/glossary/greenplum

YugabyteDB (分布式 SQL)

  1. YugabyteDB 官网 - https://www.yugabyte.com/
  2. YugabyteDB 产品页 - https://www.yugabyte.com/yugabytedb/
  3. YugabyteDB 文档 - https://docs.yugabyte.com/
  4. YSQL API 参考 - https://docs.yugabyte.com/preview/api/ysql/
  5. YugabyteDB GitHub - https://github.com/yugabyte/yugabyte-db
  6. YSQL 架构:实现分布式 PostgreSQL - https://www.yugabyte.com/blog/ysql-architecture-implementing-distributed-postgresql-in-yugabyte-db/
  7. Google Spanner 架构上的分布式 PostgreSQL - https://www.yugabyte.com/blog/distributed-postgresql-on-a-google-spanner-architecture-query-layer/
  8. YugabyteDB PostgreSQL 演进 - https://www.yugabyte.com/postgresql/
  9. Business Wire:YugabyteDB 演进 PostgreSQL - https://www.businesswire.com/news/home/20240919766328/en/YugabyteDB-Evolves-PostgreSQL-to-a-Distributed-Architecture-for-Modern-Cloud-Native-Applications
  10. YugabyteDB Wikipedia - https://en.wikipedia.org/wiki/YugabyteDB

CockroachDB (分布式数据库)

  1. CockroachDB PostgreSQL 兼容性 - https://www.cockroachlabs.com/docs/stable/postgresql-compatibility
  2. CockroachDB GitHub - https://github.com/cockroachdb/cockroach
  3. CockroachDB 分布式 SQL - https://www.cockroachlabs.com/glossary/distributed-db/distributed-sql/
  4. PostgreSQL 兼容数据库:两种方法的故事 - https://www.cockroachlabs.com/blog/postgresql-compatible-database-cockroachdb/
  5. 为什么 CockroachDB 与 PostgreSQL 兼容 - https://www.cockroachlabs.com/blog/why-postgres/
  6. 比较 CockroachDB 和 PostgreSQL - https://www.cockroachlabs.com/blog/postgresql-vs-cockroachdb/
  7. Airbyte:CockroachDB vs PostgreSQL - https://airbyte.com/data-engineering-resources/cockroachdb-vs-postgres
  8. CockroachDB vs PostgreSQL 综合比较 - https://www.sprinkledata.com/blogs/cockroachdb-vs-postgresql-a-comprehensive-comparison
  9. Prisma CockroachDB 集成 - https://www.prisma.io/docs/orm/overview/databases/cockroachdb
  10. Hacker News 讨论 - https://news.ycombinator.com/item?id=25439878

EnterpriseDB (企业级 PostgreSQL)

  1. EDB 文档门户 - https://www.enterprisedb.com/docs/
  2. EDB Postgres Advanced Server v17 - https://www.enterprisedb.com/docs/epas/latest/
  3. EDB PostgreSQL 安装指南 - https://www.enterprisedb.com/docs/supported-open-source/postgresql/installing/
  4. EDB 下载页面 - https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
  5. EDB Postgres AI - https://www.enterprisedb.com/
  6. EDB 数据库产品 - https://www.enterprisedb.com/products/database
  7. EDB GitHub 部署 - https://github.com/EnterpriseDB/postgres-deployment
  8. Red Hat Catalog - https://catalog.redhat.com/en/software/applications/detail/201127
  9. IBM EDB 合作 - https://www.ibm.com/products/postgres-enterprise

云服务提供商 PostgreSQL

Amazon Aurora PostgreSQL

  1. Aurora PostgreSQL 指南 - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/Aurora.AuroraPostgreSQL.html
  2. Aurora 版本信息 - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Updates.20180305.html
  3. Aurora 发布说明 - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/Welcome.html
  4. Aurora 更新文档 - https://docs.aws.amazon.com/AmazonRDS/latest/AuroraPostgreSQLReleaseNotes/AuroraPostgreSQL.Updates.html
  5. Aurora DSQL - https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-postgresql-compatibility.html
  6. Aurora 主页 - https://aws.amazon.com/rds/aurora/
  7. Aurora 资源 - https://aws.amazon.com/rds/aurora/resources/
  8. Aurora 架构:MySQL & PostgreSQL 兼容性 - https://dataengineeracademy.com/blog/amazon-aurora-architecture-mysql-postgresql-compatibility/
  9. Aurora 深度解析 - https://aws.amazon.com/blogs/database/is-amazon-rds-for-postgresql-or-amazon-aurora-postgresql-a-better-choice-for-me/
  10. Aurora 支持 PostgreSQL 16.4, 15.8, 14.13 - https://aws.amazon.com/about-aws/whats-new/2024/09/amazon-aurora-supports-postgresql-new-versions/

Google AlloyDB

  1. AlloyDB 文档 - https://cloud.google.com/alloydb/docs
  2. AlloyDB 概览 - https://cloud.google.com/alloydb/docs/overview
  3. AlloyDB 产品页 - https://cloud.google.com/products/alloydb
  4. AlloyDB 发布说明 - https://cloud.google.com/alloydb/docs/release-notes
  5. AlloyDB 支持的扩展 - https://cloud.google.com/alloydb/docs/reference/extensions
  6. AlloyDB 安全特性 - https://cloud.google.com/alloydb/docs/manage-application-data-security-parameterized-secure-views
  7. Inside AlloyDB - https://cloudchipr.com/blog/alloydb
  8. TechCrunch:Google Cloud 推出 AlloyDB - https://techcrunch.com/2022/05/11/google-cloud-launches-alloydb-a-new-fully-managed-postgresql-database-service/
  9. InfoQ:AlloyDB GA 发布 - https://www.infoq.com/news/2022/12/google-cloud-alloydb-postgresql/

Google Cloud SQL for PostgreSQL

  1. Cloud SQL PostgreSQL 文档 - https://cloud.google.com/sql/docs/postgres
  2. Cloud SQL 特性指南 - https://cloud.google.com/sql/docs/postgres/features
  3. Cloud SQL 介绍 - https://cloud.google.com/sql/docs/introduction
  4. Cloud SQL PostgreSQL 产品页 - https://cloud.google.com/sql/postgresql
  5. Cloud SQL 最佳实践 - https://cloud.google.com/sql/docs/postgres/best-practices
  6. 创建 Cloud SQL 实例 - https://cloud.google.com/sql/docs/postgres/create-instance
  7. Cloud SQL 发布说明 - https://cloud.google.com/sql/docs/release-notes
  8. Cloud SQL 通用特性 - https://cloud.google.com/sql/docs/features
  9. Cloud SQL 网络架构升级 - https://cloud.google.com/sql/docs/postgres/upgrade-cloud-sql-instance-new-network-architecture
  10. Cloud SQL 服务 - https://cloud.google.com/sql

Azure PostgreSQL

  1. Azure Cosmos DB for PostgreSQL - https://learn.microsoft.com/en-us/azure/postgresql/hyperscale/moved
  2. Cosmos DB PostgreSQL 介绍 - https://learn.microsoft.com/en-us/azure/cosmos-db/postgresql/introduction
  3. Azure 上的 Citus - https://www.citusdata.com/product/hyperscale-citus/
  4. Azure PostgreSQL Citus 入门 - https://www.sqlshack.com/getting-started-with-azure-database-for-postgresql-citus-server/
  5. 何时使用 Hyperscale (Citus) - https://techcommunity.microsoft.com/blog/adforpostgresql/when-to-use-hyperscale-citus-to-scale-out-postgres/1958269
  6. Hyperscale (Citus) 新特性 - https://www.citusdata.com/blog/2021/05/29/whats-new-in-hyperscale-citus-for-postgres-on-azure-ft-read-replicas/
  7. Azure 上的 PostgreSQL 14 - https://www.postgresql.org/about/news/postgresql-14-available-in-production-on-azure-in-hyperscale-citus-2329/

PostgreSQL 生态系统综合资源

  1. PostgreSQL Wiki - 衍生数据库 - https://wiki.postgresql.org/wiki/PostgreSQL_derived_databases
  2. Elephant Roads: PostgreSQL 分支之旅 - https://www.slideshare.net/pgconf/elephant-roads-a-tour-of-postgres-forks
  3. Awesome PostgreSQL - https://github.com/dhamaniasad/awesome-postgres
  4. PostgreSQL 官网 - https://www.postgresql.org/
  5. PostgreSQL 文档 - https://www.postgresql.org/docs/
  6. Postgres Professional Fork - https://github.com/postgrespro/postgrespro
  7. 数据库分叉:无需复制的复制艺术 - https://www.cybertec-postgresql.com/en/forking-databases-the-art-of-copying-without-copying/
  8. Fork 定义 - https://pgpedia.info/f/fork.html

Vonng 博客相关文章

  1. PostgreSQL:最成功的数据库 - https://vonng.com/cn/blog/db/pg-is-no1/
  2. PGSQL x Pigsty: 数据库全能王 - http://vonng.com/cn/blog/db/pgsql-x-pigsty/
  3. 开箱即用的PG发行版:Pigsty - http://vonng.com/cn/blog/db/pigsty-intro/
  4. PostgreSQL 到底有多强? - https://vonng.com/cn/blog/db/pg-performence/
  5. PostgreSQL 规约(PG16) - https://vonng.com/cn/blog/db/pg-convention/
  6. 墨天轮风云人物访谈录 —— 冯若航 - https://vonng.com/cn/blog/life/modb-interview-vonng/
  7. Self-Hosting Supabase on PostgreSQL - https://blog.vonng.com/en/pg/supabase/
  8. Database in Kubernetes: Is that a good idea? - https://vonng.com/cn/blog/en/db-in-k8s/
  9. Cloudflare 如何用 15 个 PG 集群支持 55M QPS - https://vonng.com/cn/blog/db/pg-scalability/

中文教程与实践

  1. PostgreSQL+Citus 分布式数据库快速部署指南 - https://blog.csdn.net/z13615480737/article/details/142863990
  2. 使用 PostgreSQL 16.1 + Citus 12.1 作为分布式存储后端 - https://www.cnblogs.com/hacker-linner/p/17927526.html
  3. PostgreSQL 教程 | 菜鸟教程 - https://www.runoob.com/postgresql/postgresql-tutorial.html
  4. 分布式 PostgreSQL 集群(Citus)官方安装指南 - https://blog.csdn.net/o__cc/article/details/123626067
  5. 分布式 PostgreSQL 集群(Citus)官方示例 - 多租户应用 - https://www.cnblogs.com/hacker-linner/p/16007495.html
  6. Citus 官方快速入门教程 - https://cloud.tencent.com/developer/article/1970022
  7. PostgreSQL citus python 环境搭建 - https://zhuanlan.zhihu.com/p/455305077

技术博客与深度文章

  1. PostgreSQL 扩展生态系统 - https://www.postgresql.org/about/news/pigsty-v33-release-with-404-postgresql-extensions-3023/
  2. PostgreSQL 作为应用开发平台 - https://www.amazingcto.com/postgres-for-everything/
  3. PostgreSQL 与 NoSQL 的融合 - https://www.postgresql.org/about/news/postgresql-96-released-1703/
  4. PostgreSQL JSONB 深度解析 - https://www.compose.com/articles/faster-operations-with-the-jsonb-data-type-in-postgresql/
  5. PostgreSQL 全文搜索能力 - https://www.postgresql.org/docs/current/textsearch.html

性能优化与基准测试

  1. PostgreSQL 性能调优指南 - https://wiki.postgresql.org/wiki/Performance_Optimization
  2. pgbench 基准测试 - https://www.postgresql.org/docs/current/pgbench.html
  3. sysbench PostgreSQL 测试 - https://github.com/akopytov/sysbench
  4. HammerDB PostgreSQL 基准测试 - https://www.hammerdb.com/docs/ch04s03.html
  5. TPC-C PostgreSQL 实现 - https://github.com/Percona-Lab/sysbench-tpcc

迁移指南

  1. Oracle 到 PostgreSQL 迁移 - https://wiki.postgresql.org/wiki/Oracle_to_Postgres_Conversion
  2. SQL Server 到 PostgreSQL 迁移 - https://wiki.postgresql.org/wiki/Microsoft_SQL_Server_to_PostgreSQL_Migration_by_Ian_Harding
  3. MySQL 到 PostgreSQL 迁移 - https://wiki.postgresql.org/wiki/Converting_from_other_Databases_to_PostgreSQL#MySQL
  4. MongoDB 到 PostgreSQL 迁移 - https://www.citusdata.com/blog/2018/07/11/migrating-from-mongodb-to-postgres-with-citus/
  5. AWS Database Migration Service - https://aws.amazon.com/dms/

监控与运维

  1. pg_stat_statements - https://www.postgresql.org/docs/current/pgstatstatements.html
  2. pgBadger 日志分析 - https://github.com/darold/pgbadger
  3. pg_top 实时监控 - https://github.com/markwkm/pg_top
  4. pgCenter 监控工具 - https://github.com/lesovsky/pgcenter
  5. Prometheus PostgreSQL Exporter - https://github.com/prometheus-community/postgres_exporter

备份与恢复

  1. pg_dump 和 pg_restore - https://www.postgresql.org/docs/current/app-pgdump.html
  2. pgBackRest - https://pgbackrest.org/
  3. Barman 备份管理 - https://www.pgbarman.org/
  4. WAL-E/WAL-G - https://github.com/wal-g/wal-g
  5. pg_probackup - https://github.com/postgrespro/pg_probackup

高可用与复制

  1. PostgreSQL 流复制 - https://www.postgresql.org/docs/current/warm-standby.html
  2. Patroni 高可用方案 - https://github.com/zalando/patroni
  3. repmgr 复制管理 - https://repmgr.org/
  4. pgpool-II - https://www.pgpool.net/
  5. Stolon - https://github.com/sorintlab/stolon

安全与合规

  1. PostgreSQL 安全最佳实践 - https://www.postgresql.org/docs/current/sql-grant.html
  2. Row Level Security - https://www.postgresql.org/docs/current/ddl-rowsecurity.html
  3. pgAudit 审计扩展 - https://github.com/pgaudit/pgaudit
  4. PostgreSQL TLS/SSL 配置 - https://www.postgresql.org/docs/current/ssl-tcp.html
  5. SCRAM 认证 - https://www.postgresql.org/docs/current/sasl-authentication.html

开发工具与IDE

  1. pgAdmin 4 - https://www.pgadmin.org/
  2. DBeaver - https://dbeaver.io/
  3. DataGrip - https://www.jetbrains.com/datagrip/
  4. psql 命令行工具 - https://www.postgresql.org/docs/current/app-psql.html
  5. TablePlus - https://tableplus.com/

社区与会议

  1. PostgreSQL 邮件列表 - https://www.postgresql.org/list/
  2. Planet PostgreSQL - https://planet.postgresql.org/
  3. PGConf 系列会议 - https://www.pgconf.org/
  4. PostgreSQL Europe - https://www.postgresql.eu/
  5. 中国 PostgreSQL 用户会 - http://www.postgres.cn/

书籍与教程

  1. PostgreSQL 36计 - http://pg36g.vonng.com/
  2. PostgreSQL 技术内幕 - https://pgint.vonng.com/
  3. PostgreSQL 指南:内幕探索 - https://pg-internal.vonng.com/
  4. 设计数据密集型应用(第二版) - http://ddia.vonng.com/
  5. PostgreSQL 14 Internals - https://postgrespro.com/community/books/internals

视频教程

  1. PostgreSQL Tutorial - Full Course for Beginners - https://www.youtube.com/watch?v=qw--VYLpxG4
  2. Citus Data YouTube Channel - https://www.youtube.com/@CitusData
  3. EDB YouTube Channel - https://www.youtube.com/@EnterpriseDB
  4. Percona YouTube Channel - https://www.youtube.com/@PerconaChannel
  5. PostgreSQL YouTube Channel - https://www.youtube.com/@postgresql

技术规范与标准

  1. SQL:2023 标准 - https://www.iso.org/standard/76583.html
  2. PostgreSQL 协议文档 - https://www.postgresql.org/docs/current/protocol.html
  3. PostgreSQL 扩展开发 - https://www.postgresql.org/docs/current/extend.html
  4. PostgreSQL C API - https://www.postgresql.org/docs/current/libpq.html
  5. PostgreSQL SPI - https://www.postgresql.org/docs/current/spi.html

未来发展与研究

  1. PostgreSQL Roadmap - https://www.postgresql.org/developer/roadmap/
  2. PostgreSQL CommitFest - https://commitfest.postgresql.org/
  3. PostgreSQL GSoC - https://wiki.postgresql.org/wiki/GSoC
  4. 数据库研究论文 - https://db.cs.cmu.edu/papers/
  5. VLDB 会议论文 - https://vldb.org/pvldb/

学习路径建议

初学者路径

  1. 了解 PostgreSQL 基础架构
  2. 学习 PostgreSQL 扩展机制
  3. 尝试 Citus 分布式功能
  4. 探索 TimescaleDB 时序特性
  5. 使用 Supabase 快速开发

运维人员路径

  1. 掌握 Pigsty 部署管理
  2. 学习高可用方案(Patroni、repmgr)
  3. 实践备份恢复(pgBackRest、Barman)
  4. 监控优化(pg_stat_statements、pgBadger)
  5. 安全加固(TDE、审计、RLS)

架构师路径

  1. 评估不同内核分支特性
  2. 设计分布式架构方案
  3. 规划数据库迁移策略
  4. 制定性能优化方案
  5. 构建混合云架构

开发者路径

  1. 选择合适的 PostgreSQL 变体
  2. 学习特定分支的 API 和特性
  3. 开发数据密集型应用
  4. 实现实时数据处理
  5. 集成机器学习能力

总结

PostgreSQL 的内核生态系统展现了开源数据库的强大生命力。通过不同的分支和变体,PostgreSQL 能够满足从传统 OLTP 到现代云原生、从关系型到 NoSQL、从单机到分布式的各种需求。选择合适的 PostgreSQL 变体,结合 Pigsty 这样的元发行版,可以构建出功能强大、性能卓越、运维简单的数据库解决方案。

PostgreSQL 正在成为数据库领域的"Linux内核",而各种分支和发行版则是这个生态系统中的重要组成部分。未来,我们将看到更多创新的 PostgreSQL 变体出现,为不同的应用场景提供最优解决方案。

最后更新于