This is the multi-page printable view of this section. Click here to print.
关于Pigsty
1 - 亮点特性
“PostgreSQL In Great STYle”: Postgres, Infras, Graphics, Service, Toolbox, it’s all Yours.
—— 开箱即用、本地优先的 PostgreSQL 发行版,开源 RDS 替代
价值主张
- 可扩展性: 强力扩展开箱即用:深度整合PostGIS, TimescaleDB, Citus, PGVector, ParadeDB, Hydra, AGE , PGML 等 340 插件。
- 可靠性:快速创建高可用、故障自愈的 PostgreSQL 集群,自动预置的时间点恢复、访问控制、自签名 CA 与 SSL,确保数据坚如磐石。
- 可观测性: 基于 Prometheus & Grafana 现代可观测性技术栈,提供惊艳的监控最佳实践。模块化设计,可独立使用:画廊 & Demo。
- 可用性:交付稳定可靠,自动路由,事务池化、读写分离的高性能数据库服务,通过 HAProxy,Pgbouncer,VIP 提供灵活的接入模式。
- 可维护性:简单易用,基础设施即代码,管理SOP预案,自动调参,本地软件仓库,Vagrant 沙箱与 Terraform 模板,不停机迁移方案。
- 可组合性:模块化架构设计,可复用的 Infra,多样的可选 模块:Redis, MinIO, ETCD, FerretDB, DuckDB, Supabase, Docker 应用。
总览
Pigsty 是一个更好的本地开源 RDS for PostgreSQL 替代:
- 开箱即用的RDS:从内核到RDS发行版,在 EL/Debian/Ubuntu 下提供 12-17 版本的生产级 PG 数据库服务。
- 丰富的扩展插件:提供无可比拟的 340+ 扩展,提供开箱即用的分布式的时序地理空间图文向量多模态数据库能力。
- 灵活的模块架构:灵活组合,自由扩展:Redis/Etcd/MinIO/Mongo;可独立使用,监控现有RDS/主机/数据库。
- 惊艳的观测能力:基于现代可观测性技术栈 Prometheus/Grafana,提供令人惊艳,无可比拟的数据库观测能力。
- 验证过的可靠性:故障自愈的高可用架构:硬件故障自动切换,流量无缝衔接。并提供自动配置的 PITR 兜底删库!
- 简单易用可维护:声明式API,GitOps就位,傻瓜式操作,Database/Infra-as-Code 以及管理SOP封装管理复杂度!
- 扎实的安全实践:加密备份一应俱全,自带基础ACL最佳实践。只要硬件与密钥安全,您无需操心数据库的安全性!
- 广泛的应用场景:低代码数据应用开发,或使用预置的 Docker Compose 模板,一键拉起使用PostgreSQL的海量软件!
- 开源的自由软件:以云数据库1/10不到的成本拥有与更好的数据库服务!帮您真正“拥有”自己的数据,实现自主可控!
PostgreSQL 整合了生态中的工具与最佳实践:
- 开箱即用的 PostgreSQL 发行版,深度整合地理、时序、分布式、图、向量、搜索、AI等 340 余个扩展插件!
- 运行于裸操作系统之上,无需容器支持,支持主流操作系统: EL7/8/9, Ubuntu 20.04/22.04/24.04 以及 Debian 11/12。
- 基于 patroni, haproxy, 与etcd,打造故障自愈的高可用架构:硬件故障自动切换,流量无缝衔接。
- 基于 pgBackRest 与可选的 MinIO 集群提供开箱即用的 PITR 时间点恢复,为软件缺陷与人为删库兜底。
- 基于 Ansible 提供声明式的 API 对复杂度进行抽象,以 Database-as-Code 的方式极大简化了日常运维管理操作。
- Pigsty用途广泛,可用作完整应用运行时,开发演示数据/可视化应用,大量使用 PG 的软件可用 Docker 模板一键拉起。
- 提供基于 Vagrant 的本地开发测试沙箱环境,与基于 Terraform 的云端自动部署方案,开发测试生产保持环境一致。
- 部署并监控专用的 Redis(主从,哨兵,集群),MinIO,Etcd,Haproxy,MongoDB (FerretDB) 集群
开箱即用的RDS
让您立刻在本地拥有生产级的PostgreSQL数据库服务!
PostgreSQL 是一个足够完美的数据库内核,但它需要更多工具与系统的配合才能成为一个足够好的数据库服务(RDS),而 Pigsty 帮助 PostgreSQL 完成这一步飞跃,帮助用户用好这个强大的数据库。
Pigsty 支持的数据库版本覆盖 PostgreSQL 12 ~ 17,可以运行于 EL / Debian / Ubuntu 以及 兼容 操作系统发行版中。 除了数据库内核与大量开箱即用的扩展插件以外,Pigsty更是提供了数据库服务所需的完整运行时基础设施,与本地沙箱/生产环境/IaaS全自动部署方案。
您无需依赖任何外部组件或互联网访问,便可以在任何环境中一键拉起生产级的 PostgreSQL RDS 服务,10分钟从全新裸机进入生产可用状态。 参数将根据您的硬件规格自动进行优化调整,内核扩展安装,连接池,负载均衡,服务接入,高可用/自动切换,日志监控,备份恢复PITR,访问控制,参数调优,安全加密,证书签发,NTP,DNS,配置管理,CMDB,管理预案……,所有这些在生产环境中可能会遇到的问题,Pigsty 都帮您预先考虑好了。 您所要做的就是一键安装好,然后使用连接串URL连上去使用即可。
丰富的扩展插件
彻底释放世界上最先进的关系型数据库的力量!
PostgreSQL 的灵魂在于其丰富的 扩展插件 生态,而 Pigsty 深度整合了 PostgreSQL 生态扩展插件,为您提供开箱即用的分布式的时序地理空间图文向量数据库能力!让这些插件产生协同化合反应,产生 1+1 » 2 的效果。
Pigsty 收录了超过 340+ PostgreSQL 扩展插件,编译维护打包了一些官方仓库没有收录的扩展,并且通过充分的测试确保所有这些插件可以正常协同工作: 您可以使用 PostGIS 处理地理空间数据,使用 TimescaleDB 分析时序/事件流数据,使用 Citus 将单机数据库原地改造为水平扩展的分布式数据库集群, 使用 PGVector 存储并搜索 AI 嵌入实现向量数据库的效果,使用 Apache AGE 进行图数据存储与检索实现 Neo4J 的效果,使用 ParadeDB 实现 ElasticSearch 的效果, 以及 Hydra、 DuckdbFDW、pg_analytics、pg_duckdb 实现专用 OLAP 数据库的分析表现。
Pigsty 还允许您在裸机高可用 PostgreSQL 集群上自行托管 Supabase 与 PostgresML ,并与海量扩展组合使用。 如果您想要的扩展没有被 Pigsty 收录,欢迎提出收录 建议 或自行编译加装。
灵活的模块架构
灵活组合,自由扩展,多数据库支持,监控现有RDS/主机/数据库
在 Pigsty 中功能组件被抽象为 模块,可以自由组合以应对多变的需求场景。INFRA
模块带有完整的现代监控技术栈,而 NODE
模块则将节点调谐至指定状态并纳入监控。
在多个节点上安装 PGSQL
模块会自动组建出一个基于主从复制的高可用数据库集群,而同样的 ETCD
模块则为数据库高可用提供共识与元数据存储。可选的 MINIO
模块可以用作图像视频等大文件存储并可选用为数据库备份仓库。
与 PG 有着极佳相性的 REDIS
亦为 Pigsty 所支持,Pigsty 也允许您使用 MONGO
模块,利用 FerretDB 在 PostgreSQL 集群上提供 MongoDB 协议兼容的服务。
更多的模块(如 GPSQL
, MYSQL
, KAFKA
)将会在后续加入,你也可以开发自己的模块并自行扩展 Pigsty 的能力,并与社区用户分享。
此外,Pigsty的监控系统模块部分还可以 独立使用 ——用它来监控现有的主机节点与数据库实例,或者是云上的 RDS 服务。只需要一个连接串一行命令,您就可以获得极致的 PostgreSQL 可观测性体验。
惊艳的观测能力
使用现代开源可观测性技术栈,提供无与伦比的监控最佳实践!
Pigsty 提供了基于开源的 Grafana / Prometheus 现代可观测性技术栈做 监控 的最佳实践:Prometheus 用于收集监控指标,Grafana 负责可视化呈现,Loki 用于日志收集与查询,Alertmanager 用于告警通知。 PushGateway 用于批处理任务监控,Blackbox Exporter 负责检查服务可用性。整套系统同样被设计为一键拉起,开箱即用的 INFRA 模块。
Pigsty 所管理的任何组件都会被自动纳入监控之中,包括主机节点,负载均衡 HAProxy,数据库 Postgres,连接池 Pgbouncer,元数据库 ETCD,KV缓存 Redis,对象存储 MinIO,……,以及整套监控基础设施本身。大量的 Grafana 监控面板与预置告警规则会让你的系统观测能力有质的提升,当然,这套系统也可以被复用于您的应用监控基础设施,或者监控已有的数据库实例或 RDS。
无论是故障分析还是慢查询优化、无论是水位评估还是资源规划,Pigsty 为您提供全面的数据支撑,真正做到数据驱动。在 Pigsty 中,超过三千类监控指标被用于描述整个系统的方方面面,并被进一步加工、聚合、处理、分析、提炼并以符合直觉的可视化模式呈现在您的面前。从全局大盘总览,到某个数据库实例中单个对象(表,索引,函数)的增删改查详情都能一览无余。您可以随意上卷下钻横向跳转,浏览系统现状与历史趋势,并预测未来的演变。
验证过的可靠性
开箱即用的高可用与时间点恢复能力,确保你的数据库坚如磐石!
对于软件缺陷或人为误操作造成的删表删库,Pigsty 提供了开箱即用的 PITR 时间点恢复能力,无需额外配置即默认启用。只要存储空间管够,基于 pgBackRest
的基础备份与 WAL 归档让您拥有快速回到过去任意时间点的能力。您可以使用本地目录/磁盘,亦或专用的 MinIO 集群或 S3 对象存储服务保留更长的回溯期限,丰俭由人。
更重要的是,Pigsty 让高可用与故障自愈成为 PostgreSQL 集群的标配,基于 patroni
, etcd
, 与 haproxy
打造的故障自愈架构,让您在面对硬件故障时游刃有余:主库故障自动切换的 RTO < 30s(可配置),一致性优先模式下确保数据零损失 RPO = 0。只要集群中有任意实例存活,集群就可以对外提供完整的服务,而客户端只要连接至集群中的任意节点,即可获得完整的服务。
Pigsty 内置了 HAProxy 负载均衡器用于自动流量切换,提供 DNS/VIP/LVS 等多种接入方式供客户端选用。故障切换与主动切换对业务侧除零星闪断外几乎无感知,应用不需要修改连接串重启。极小的维护窗口需求带来了极大的灵活便利:您完全可以在无需应用配合的情况下滚动维护升级整个集群。硬件故障可以等到第二天再抽空善后处置的特性,让研发,运维与 DBA 都能安心睡个好觉。 许多大型组织与核心机构已经在生产环境中长时间使用 Pigsty ,最大的部署有 25K CPU 核心与 200+ PostgreSQL 超大规格实例;在这一部署案例中,四年内经历了数十次硬件故障与各类事故,但依然可以保持比 99.999% 更高的可用性战绩。
简单易用可维护
Infra as Code, 数据库即代码,声明式的API将数据库管理的复杂度来封装。
Pigsty 使用声明式的接口对外提供服务,将系统的可控制性拔高到一个全新水平:用户通过配置清单告诉 Pigsty “我想要什么样的数据库集群”,而不用去操心到底需要怎样去做。从效果上讲,这类似于 K8S 中的 CRD 与 Operator,但 Pigsty 可用于任何节点上的数据库与基础设施:不论是容器,虚拟机,还是物理机。
无论是创建/销毁集群,添加/移除从库,还是新增数据库/用户/服务/扩展/黑白名单规则,您只需要修改配置清单并运行 Pigsty 提供的幂等剧本,而 Pigsty 负责将系统调整到您期望的状态。 用户无需操心配置的细节,Pigsty将自动根据机器的硬件配置进行调优,您只需要关心诸如集群叫什么名字,有几个实例放在哪几台机器上,使用什么配置模版:事务/分析/核心/微型,这些基础信息,研发也可以自助服务。但如果您愿意跳入兔子洞中,Pigsty 也提供了丰富且精细的控制参数,满足最龟毛 DBA 的苛刻定制需求。
除此之外,Pigsty 本身的安装部署也是一键傻瓜式的,所有依赖被预先打包,在安装时可以无需互联网访问。而安装所需的机器资源,也可以通过 Vagrant 或 Terraform 模板自动获取,让您在十几分钟内就可以从零在本地笔记本或云端虚拟机上拉起一套完整的 Pigsty 部署。本地沙箱环境可以跑在1核2G的微型虚拟机中,提供与生产环境完全一致的功能模拟,可以用于开发、测试、演示与学习。
扎实的安全实践
加密备份一应俱全,只要硬件与密钥安全,您无需操心数据库的安全性。
每套 Pigsty 部署都会创建一套自签名的 CA 用于证书签发,所有的网络通信都可以使用 SSL 加密。数据库密码使用合规的 scram-sha-256
算法加密存储,远端备份会使用 AES-256
算法加密。此外还针对 PGSQL 提供了一套开箱即用的的访问控制体系,足以应对绝大多数应用场景下的安全需求。
Pigsty 针对 PostgreSQL 提供了一套开箱即用,简单易用,精炼灵活的,便于扩展的访问控制体系,包括职能分离的四类默认角色:读(DQL) / 写(DML) / 管理(DDL) / 离线(ETL) ,与四个默认用户:dbsu / replicator / monitor / admin。 所有数据库模板都针对这些角色与用户配置有合理的默认权限,而任何新建的数据库对象也会自动遵循这套权限体系,而客户端的访问则受到一套基于最小权限原则的设计的 HBA 规则组限制,任何敏感操作都会记入日志审计。
任何网络通信都可以使用 SSL 加密,需要保护的敏感管理页面与API端点都受到多重保护:使用用户名与密码进行认证,限制从管理节点/基础设施节点IP地址/网段访问,要求使用 HTTPS 加密网络流量。Patroni API 与 Pgbouncer 因为性能因素默认不启用 SSL ,但亦提供安全开关便于您在需要时开启。 合理配置的系统通过等保三级毫无问题,只要您遵循安全性最佳实践,内网部署并合理配置安全组与防火墙,数据库安全性将不再是您的痛点。
广泛的应用场景
使用预置的Docker模板,一键拉起使用PostgreSQL的海量软件!
在各类数据密集型应用中,数据库往往是最为棘手的部分。例如 Gitlab 企业版与社区版的核心区别就是底层 PostgreSQL 数据库的监控与高可用,如果您已经有了足够好的本地 PG RDS,完全可以拒绝为软件自带的土法手造数据库组件买单。
Pigsty 提供了 Docker 模块与大量开箱即用的 Compose 模板。您可以使用 Pigsty 管理的高可用 PostgreSQL (以及 Redis 与 MinIO )作为后端存储,以无状态的模式一键拉起这些软件: Gitlab、Gitea、Wiki.js、NocoDB、Odoo、Jira、Confluence、Habour、Mastodon、Discourse、KeyCloak 等等。如果您的应用需要一个靠谱的 PostgreSQL 数据库, Pigsty 也许是最简单的获取方案。
Pigsty 也提供了与 PostgreSQL 紧密联系的应用开发工具集:PGAdmin4、PGWeb、ByteBase、PostgREST、Kong、以及 EdgeDB、FerretDB、Supabase 这些使用 PostgreSQL 作为存储的"上层数据库"。更奇妙的是,您完全可以基于 Pigsty 内置了的 Grafana 与 Postgres ,以低代码的方式快速搭建起一个交互式的数据应用来,甚至还可以使用 Pigsty 内置的 ECharts 面板创造更有表现力的交互可视化作品。
开源的自由软件
Pigsty是基于 AGPLv3 开源的自由软件,由热爱 PostgreSQL 的社区成员用热情浇灌
Pigsty 是完全 开源免费 的自由软件,它允许您在缺乏数据库专家的情况下,用几乎接近纯硬件的成本来运行企业级的 PostgreSQL 数据库服务。作为对比,公有云厂商提供的 RDS 会收取底层硬件资源几倍到十几倍不等的 溢价 作为 “服务费”。
很多用户选择上云,正是因为自己搞不定数据库;很多用户使用 RDS,是因为别无他选。我们将打破云厂商的垄断,为用户提供一个云中立的,更好的 RDS 开源替代: Pigsty 紧跟 PostgreSQL 上游主干,不会有供应商锁定,不会有恼人的 “授权费”,不会有节点数量限制,不会收集您的任何数据。您的所有的核心资产 —— 数据,都能"自主可控",掌握在自己手中。
Pigsty 本身旨在用数据库自动驾驶软件,替代大量无趣的人肉数据库运维工作,但再好的软件也没法解决所有的问题。总会有一些的冷门低频疑难杂症需要专家介入处理。这也是为什么我们也提供专业的 订阅服务,来为有需要的企业级用户使用 PostgreSQL 提供兜底。几万块的订阅咨询费不到顶尖 DBA 每年工资的几十分之一,让您彻底免除后顾之忧,把成本真正花在刀刃上。对于社区用户,我们亦用爱发电,提供免费的支持与日常答疑。
2 - 模块列表
基础模块
Pigsty 提供了四个 基础 功能模块,对于提供完整高可用的 PostgreSQL 服务必不可少:
PGSQL
:带有高可用,时间点恢复,IaC,SOP,监控系统,以及 335 个扩展插件的自治的 PostgreSQL 集群。INFRA
:本地软件仓库、Prometheus、Grafana、Loki、AlertManager、PushGateway、Blackbox Exporter…NODE
:调整节点到所需状态、名称、时区、NTP、ssh、sudo、haproxy、docker、promtail、keepalivedETCD
:分布式键值存储,用作高可用 Postgres 集群的 DCS:共识选主/配置管理/服务发现。
内核模块
Pigsty 提供了四个 内核 功能模块 ,它们是 PostgreSQL 内核的可选原位替代,提供不同风味的数据库能力。
MSSQL
:微软 SQL Server 线缆协议兼容的 PG 内核,由 AWS, WiltonDB & Babelfish 出品!IVORY
:Oracle 兼容的 PostgreSQL 16 内核,由瀚高开源的 IvorySQL 项目提供。POLAR
: 由阿里云开源的“云原生” PostgreSQL 内核,Aurora 风味的 RAC PostgreSQL Fork。CITUS
:使用扩展实现分布式PostgreSQL集群(Azure Hyperscale),带有原生的 Patroni 高可用支持!
扩展模块
Pigsty 提供了四个 扩展 功能模块,它对于核心功能来说并非必须,但可以用于增强 PostgreSQL 的能力:
MINIO
:S3 兼容的简单对象存储服务器,可作为可选的 PostgreSQL 数据库备份仓库,带有生产部署支持与监控。REDIS
:Redis 服务器,高性能数据结构服务器,支持独立主从、哨兵、集群模式生产部署,并带有完善的监控支持。MONGO
:FerertDB 原生部署支持 —— 它为 PostgreSQL 添加了 MongoDB 线缆协议级别的 API 兼容支持!DOCKER
:Docker Daemon 服务,允许用户一键拉起容器化的无状态软件工具模板,为 Pigsty 加装各种功能!
外围模块
Pigsty 同时支持那些与 PostgreSQL 内核带有紧密联系的 外围 模块(扩展,分支,衍生,包装):
DUCKDB
:强大的嵌入式OLAP数据库,Pigsty提供二进制/动态库及相关PG扩展:pg_duckdb
,pg_lakehouse
与duckdb_fdw
SUPABASE
: Pigsty 允许用户在现有高可用 PostgreSQL 集群基础上,运行火爆的 Firebase 开源替代 —— Supabase !GREENPLUM
:基于 PostgreSQL 12 内核的 MPP 数据仓库,目前仅提供监控支持与 RPM 安装支持。(Beta)CLOUDBERRY
:Greenplum 闭源后原班开发者打造的开源分支,基于 PG 14 内核,目前仅提供RPM安装支持。(Beta)NEON
:带有数据库分支功能特性的的无服务器 PostgreSQL 内核 (WIP)
试点模块
Pigsty 正在支持一些与 PostgreSQL 生态相关的 试点 模块 试点模块,它们可能会在未来成为 Pigsty 的正式模块:
KAFKA
:使用 Pigsty 部署由 KRaft 驱动的 Kafka 消息队列,并提供开箱即用的监控支持 (Beta)MYSQL
:使用 Pigsty 部署高可用的 MySQL 8.0 集群,并提供开箱即用的监控支持(供批判/迁移评估之用) (Beta)KUBE
:使用 SealOS 搭建开箱即用的生产级 Kubernetes 部署与监控支持 (Alpha).VICTORIA
:基于 VictoriaMetrics 与 VictoriaLogs 的 Infra 替代选项,提供更好的性能与资源利用率(Alpha)JUPYTER
:开箱即用的 Jupyter Notebook 环境,用于数据分析与机器学习等场景(Alpha)
监控其他数据库
Pigsty 的 INFRA
模块可以独立使用,作为开箱即用的监控基础设施,监控其他节点或现有 PostgreSQL 数据库
- 现有 PostgreSQL 服务:Pigsty 可以监控外部的、非 Pigsty 托管的 PostgreSQL 服务,并仍可提供相对完整的监控支持。
RDS PG
:是云厂商提供的 PostgreSQL RDS 服务,将其视作标准的外部 Postgres 实例即可纳入监控PolarDB
:是阿里云的云原生数据库,将其视作外部 PostgreSQL 11 / 14 实例即可纳入监控。KingBase
: 是人大金仓提供的信创国产数据库,视作外部 PostgreSQL 12 实例即可纳入监控。Greenplum
/YMatrixDB
监控,目前将其视作水平分片的 PostgreSQL 集群即可纳入监控。
3 - 发展规划
版本发布策略
Pigsty 使用语义化版本号,例如:<主版本>.<次版本>.<修订号>
。Alpha / Beta / RC 版本会在版本号后添加后缀与标号,如 -a1
, -b1
, -c1
。
主版本更新意味着基础性变化和大量新特性;次版本更新通常表示新特性,软件包版本更新和较小的API变动,修订版本更新意味着修复bug和文档更新。
Pigsty 计划每年发布一次主版本更新,次版本更新通常跟随 PostgreSQL 小版本更新节奏,在 PostgreSQL 新版本发布后最迟一个月内跟进,通常每年 4 - 6 个小版本,完整发布历史请参考 发行注记 。
列入考虑的新特性
- 一个足够好用的命令行管理工具
- 基础设施组件的 ARM 架构支持
- 为 PostgreSQL 添加更多的扩展
- 更多预置的场景化配置模板
- 将软件仓库与安装下载源完全迁移至 Cloudflare
- 使用 SealOS 部署并监控高可用 Kubernetes 集群!
- 使用 VictoriaMetrics 替换 Prometheus 存储时序数据
- 监控部署 MySQL 数据库
- 监控 Kubernetes 中的数据库
- 提供更丰富的 Docker 应用模板
- PGLite 浏览器端支持
扩展插件与软件包
关于扩展支持的路线图,可以在这里找到:https://ext.pigsty.io/#/roadmap
需要更新
- pg_graphql: bump v1.5.4 to 1.5.7
考虑纳入
- walminer
- is_jsonb_valid https://github.com/furstenheim/is_jsonb_valid
- pg_kafka https://github.com/xstevens/pg_kafka
- pg_jieba https://github.com/jaiminpan/pg_jieba
- pg_paxos https://github.com/microsoft/pg_paxos
- OneSparse https://github.com/OneSparse/OneSparse
- PipelineDB https://github.com/pipelinedb/pipelinedb
- SQL Firewall https://github.com/uptimejp/sql_firewall
- zcurve https://github.com/bmuratshin/zcurve
- PG dot net https://github.com/Brick-Abode/pldotnet/releases
- pg_scws: https://github.com/jaiminpan/pg_scws
- themsis: https://github.com/cossacklabs/pg_themis
- pgspeck https://github.com/johto/pgspeck
- lsm3 https://github.com/postgrespro/lsm3
- monq https://github.com/postgrespro/monq
- pg_badplan https://github.com/trustly/pg_badplan
- pg_recall https://github.com/mreithub/pg_recall
- pgfsm https://github.com/michelp/pgfsm
- pg_trgm pro https://github.com/postgrespro/pg_trgm_pro
- pgsql-fio: https://github.com/csimsek/pgsql-fio
暂不考虑
- pg_tier: not ready due to incomplete dep parquet_s3_fdw
- parquet_s3_fdw: not ready due to compiler version
- pg_top: not ready due to cmake error
- timestamp9: not ready due to compiler error
- pg_tier obsolete
- pg_timeseries, we already have timescaledb
- pg_quack, we already have a pg_lakehouse
- pg_telemetry, we already have better observability
- pgx_ulid, https://github.com/pksunkara/pgx_ulid, already covered by pg_idkit (MIT, but RUST)
- embedding: obsolete
- FEAT zson https://github.com/postgrespro/zson MIT C (too old)
- GIS pghydro https://github.com/pghydro/pghydro C GPL-2.0 6.6 (no makefile)
- https://github.com/Zeleo/pg_natural_sort_order (too old)
- https://github.com/postgrespro/pg_query_state
- https://github.com/no0p/pgsampler
- pg_lz4 https://github.com/zilder/pg_lz4
- pg_amqp https://github.com/omniti-labs/pg_amqp
- tinyint https://github.com/umitanuki/tinyint-postgresql
- pg_blkchain https://github.com/blkchain/pg_blkchain
- hashtypes https://github.com/pandrewhk/hashtypes
- foreign_table_exposer https://github.com/komamitsu/foreign_table_exposer
- ldap_fdw https://github.com/guedes/ldap_fdw
- pg_backtrace https://github.com/postgrespro/pg_backtrace
- connection_limits https://github.com/tvondra/connection_limits
- fixeddecimal https://github.com/2ndQuadrant/fixeddecimal
4 - 历史沿革
历史起源
Pigsty 项目始于 2018 ~ 2019 年,起源于 探探。 探探是一个互联网交友 App —— 中国的 Tinder,现已被陌陌收购。 探探这家公司是一个北欧 Style 的创业公司,有着一个瑞典工程师初创团队。
探探在技术上极有品味,使用 PostgreSQL 与 Go 作为核心技术栈。 探探整个系统架构参照了 Instagram ,一切围绕 PostgreSQL 数据库设计。 直到几百万日活,几百万 TPS,几百 TB 数据的量级下,数据组件 只用了 PostgreSQL。 几乎所有的业务逻辑都使用 PG 存储过程实现 —— 甚至包括 100ms 的推荐算法!
探探这种深度使用 PostgreSQL 特性的非典型研发模式,对工程师与DBA的水平提出了极高的要求。 而 Pigsty ,就是我们用这种真实世界的大规模,高标准数据库集群场景打磨出的开源项目 —— 沉淀着我们作为顶尖 PostgreSQL 专家的经验与最佳实践。
发展过程
在最开始,Pigsty 并没有现在这样的愿景、目标与版图。而是旨在提供一个供我们自己使用的 PostgreSQL 监控系统。 我们调研了市面上所有的方案,开源的、商业的、云的,datadog, pgwatch,…… ,没有一个能满足我们对于可观测性的需求。 因此我们决定亲自动手,基于 Grafana 与 Prometheus 自己动手打造一个,这就是 Pigsty 的前身与雏形。 Pigsty 作为监控系统的效果相当惊艳,帮助我们解决了无数管理问题。
随后,研发人员希望在本地的开发机上也有这样的监控系统,于是我们使用 Ansible 编写了置备剧本,将这套系统从一次性建设任务转变为了可重复使用,可复制的软件。 新的功能允许用户使用 Vagrant 和 Terraform,用 Infra as Code 的方式快速拉起本地 DevBox 开发机,或生产环境服务器,并自动完成 PostgreSQL 与监控系统的部署。
接下来,我们重新设计了生产环境的 PostgreSQL 架构,引入了 Patroni 与 pgBackRest 解决了数据库的 高可用 与 时间点恢复 问题。 开发了基于逻辑复制的不停机 迁移 方案,通过蓝绿部署将生产环境两百套数据库集群滚动升级至最新大版本。并将这些能力引入 Pigsty 中。
Pigsty 是我们做给自己使用的软件,我们自己作为甲方用户,非常清楚自己需要什么,也不会在自己的需求上偷懒。 “Eat dog food”最大的好处就是,我们自己既是开发者也更是用户 —— 因此非常了解自己需要什么,也不会在自己的需求上偷懒。
我们解决了一个又一个的问题,并将解决方案沉淀到 Pigsty 里。Pigsty 的定位,也从一个监控系统,逐渐发展成为一个开箱即用的 PostgreSQL 数据库发行版。 因此在这一阶段,我们决定将 Pigsty 对外开源,并开始了一系列的技术分享与宣传,也开始有各行各业的外部用户使用起 Pigsty 并提出反馈意见。
全职创业
在 2022 年,Pigsty 项目获得了由陆奇博士发起的奇绩创坛的种子轮投资,我得以全职出来做这件事情。
作为一个开源项目,Pigsty 的发展相当不赖,在全职创业这两年里,Pigsty 在 Github 上的 Star 数从的 几百翻了几番到了 3400;上了 HN 头条推荐,增长开始滚起雪球; 在 OSSRank 开源榜单 中,Pigsty 在 PostgreSQL 生态项目中排名第 37 名,在中国人主导的项目里是最靠前的。
从前 Pigsty 只能跑在 CentOS 7 上,现今已经基本覆盖了所有主流 Linux 发行版 (EL, Debian, Ubuntu)。支持的 PG 大版本覆盖 12 - 17,维护,收录整合了PG生态中的 340+ 扩展插件。 其中,我本人维护了这里超过一半的扩展插件,并提供开箱即用的 RPM/DEB 包,算上 Pigsty 本身,“基于开源,回馈开源”,算是为 PG 生态做一些贡献。
Pigsty 的定位,也在不断发展的过程中,从一个 PostgreSQL 数据库发行版,进一步扩展到了 开源云数据库替代。它真正对标的是云厂商的整个云数据库品牌。
公有云的反叛者
AWS、Azure、GCP、Aliyun 等公有云厂商为初创企业提供了许多便利,但它们是闭源的,并迫使用户以高额费用租赁基础资源。
我们认为,优秀的数据库服务,应该和优秀的数据库内核一样,普及到每一个用户手中,而不是必须花费高昂的代价去向赛博领主租赁。
云计算的敏捷与弹性都很好,但它应该是自由、开源、普惠、本地优先的 —— 我们认为云计算宇宙中需要一个代表开源价值观的解决方案,在不牺牲云带来好处的前提下,将基础设施的控制权交还给用户。
因此,我们也在引领着一场 下云的运动与战役,作为公有云的反叛者,来重塑这个行业的价值观。
我们的愿景
我希望,未来的世界人人都有自由使用优秀服务的事实权利,而不是只能被圈养在几个公有云厂商提供的猪圈(Pigsty)里坐井观天。
这正是 Pigsty要做的事 —— 一个更好的,开源免费的RDS替代。让用户能够在任何地方(包括云服务器)上,一键拉起有比云RDS更好的数据库服务。
Pigsty 是是对 PostgreSQL 的彻底补完,更是对云数据库的辛辣嘲讽。它本意是“猪圈”,但更是 Postgres In Great STYle 的缩写,即“全盛状态下的 PostgreSQL”。
Pigsty 本身是一款完全开源免费的软件,我们纯粹靠提供 咨询与服务 来维持运营 建设良好的系统也许跑个几年都不会遇到需要 ”兜底“ 的问题,但数据库的问题一但出现就不是小问题。 很多时候,专家的经验更是能够一言化腐朽为神奇,而我们为有需求的客户提供这样的服务 —— 我们认为这是一种更加公正、合理、可持续的模式。
关于团队
我是冯若航,Pigsty 的作者,Pigsty 绝大部分的代码由我 一人开发,个别特性由社区贡献。
软件领域依然存在个人英雄主义,独一无二的个体才能够创造出独一无二的作品来 —— 我希望 Pigsty 能够成为这样的作品。
如果您对我感兴趣,这里是我的个人主页:https://vonng.com/
5 - 活动新闻
最近新闻
-
预告:Pigsty 3.1 计划于 11.20 日发布,提供完整的 PostgreSQL 17 扩展支持
-
Pigsty 3.0.4 发布! 提供扩展目录与仓库,编译 PG17扩展,自建Supabase流程优化
- 发布说明:v3.0.4
-
Pigsty 3.0.3 发布! 提供正式的 PostgreSQL 17 支持,优化 Etcd 运维与监控
- 发布说明:v3.0.3
-
Pigsty 3.0.2 发布! 精简安装模式,PolarDB 15 支持,例行问题修复(2024-09-07)
- 发布说明:v3.0.2
-
Pigsty 3.0.1 发布!Oracle 兼容性,Patroni 4 支持,例行问题修复 (2024-08-31)
- 发布说明:v3.0.1
-
Pigsty 3.0.0 发布!333 个扩展,可替换内核,完整RDS服务!
- 发布说明:v3.0.0
- 特性介绍:Pigsty v3.0.0
-
新闻:Pigsty提供的Yum/APT补充软件仓库,提供254个额外的开箱即用的二进制RPM/DEB扩展!
-
Pigsty v2.7 发布!
- PostgreSQL 官方网站: Pigsty v2.7 Released, free RDS PG with 255 extensions available
- Postgres Weekly: [https://postgresweekly.com/issues/556)
- Pigsty 博客:Pigsty v2.7:集异璧之大成
-
Pigsty v2.6 发布!
- PostgreSQL 官方网站:Pigsty, Battery-included PostgreSQL Distro & Free RDS Alternative, v2.6 released!
- Postgres 星球(X): https://twitter.com/PostgreSQL/status/1765323952669290515
- Postgres Weekly: https://postgresweekly.com/issues/545
- Pigsty 博客:Pigsty v2.6:PG 踢馆 OLAP
The name of this project always makes me grin: PIGSTY is actually an acronym, standing for Postgres In Great STYle! It’s a Postgres distribution that includes lots of components and tools out of the box in areas like availability, deployment, and observability. The latest release pushes everything up to Postgres 16.2 standards and introduces new ParadeDB and DuckDB FDW extensions.
这个项目的名字总能让我笑开花:PIGSTY 实际上是一个首字母缩略词,代表 Postgres In Great STYle!它是一个 Postgres 发行版,包括了大量的组件和工具,涵盖了可用性、部署和可观测性等领域。最新版本将所有内容推进到了 Postgres 16.2,并引入了新的 ParadeDB 和 DuckDB FDW 扩展。
版本发布
版本 | 发布时间 | 摘要 | 地址 |
---|---|---|---|
v3.1.0 | 2024-11-20 | PG 17 作为默认大版本,简化配置逻辑,软件仓库改进 | WIP |
v3.0.4 | 2024-10-30 | PG 17 扩展,OLAP 全家桶,pg_duckdb | v3.0.4 |
v3.0.3 | 2024-09-27 | PostgreSQL 17,Etcd 运维优化,IvorySQL 3.4,PostGIS 3.5 | v3.0.3 |
v3.0.2 | 2024-09-07 | 精简安装模式,PolarDB 15支持,监控视图更新 | v3.0.2 |
v3.0.1 | 2024-08-31 | 例行问题修复,Patroni 4支持,Oracle兼容性改进 | v3.0.1 |
v3.0.0 | 2024-08-25 | 333个扩展插件,可插拔内核,MSSQL,Oracle,PolarDB 兼容性 | v3.0.0 |
v2.7.0 | 2024-05-20 | 扩展大爆炸,新增20+强力扩展插件,与多款Docker应用 | v2.7.0 |
v2.6.0 | 2024-02-28 | PG 16 作为默认大版本,引入 ParadeDB 与 DuckDB 等扩展 | v2.6.0 |
v2.5.1 | 2023-12-01 | 例行小版本更新,PG16重要扩展支持 | v2.5.1 |
v2.5.0 | 2023-09-24 | Ubuntu/Debian支持:bullseye, bookworm, jammy, focal | v2.5.0 |
v2.4.1 | 2023-09-24 | Supabase/PostgresML支持与各种新扩展:graphql, jwt, pg_net, vault | v2.4.1 |
v2.4.0 | 2023-09-14 | PG16,监控RDS,服务咨询支持,新扩展:中文分词全文检索/图/HTTP/嵌入等 | v2.4.0 |
v2.3.1 | 2023-09-01 | 带HNSW的PGVector,PG 16 RC1, 文档翻新,中文文档,例行问题修复 | v2.3.1 |
v2.3.0 | 2023-08-20 | 主机VIP, ferretdb, nocodb, MySQL存根, CVE修复 | v2.3.0 |
v2.2.0 | 2023-08-04 | 仪表盘 & 置备重做,UOS 兼容性 | v2.2.0 |
v2.1.0 | 2023-06-10 | 支持 PostgreSQL 12 ~ 16beta | v2.1.0 |
v2.0.2 | 2023-03-31 | 新增 pgvector 支持,修复 MinIO CVE | v2.0.2 |
v2.0.1 | 2023-03-21 | v2 错误修复,安全增强,升级 Grafana 版本 | v2.0.1 |
v2.0.0 | 2023-02-28 | 架构大升级,兼容性、安全性、可维护性显著增强 | v2.0.0 |
v1.5.1 | 2022-06-18 | Grafana 安全性修复 | v1.5.1 |
v1.5.0 | 2022-05-31 | Docker 应用程序支持 | v1.5.0 |
v1.4.1 | 2022-04-20 | 错误修复 & 英文文档完整翻译 | v1.4.1 |
v1.4.0 | 2022-03-31 | MatrixDB 支持,分离 INFRA/NODES/PGSQL/REDIS模块 | v1.4.0 |
v1.3.0 | 2021-11-30 | PGCAT 重整 & PGSQL 增强 & Redis Beta支持 | v1.3.0 |
v1.2.0 | 2021-11-03 | 默认 PGSQL 版本升级至 14 | v1.2.0 |
v1.1.0 | 2021-10-12 | 主页, JupyterLab, PGWEB, Pev2 & pgbadger | v1.1.0 |
v1.0.0 | 2021-07-26 | v1 正式版, 监控系统重整 | v1.0.0 |
v0.9.0 | 2021-04-04 | Pigsty 图形界面, 命令行界面, 日志集成 | v0.9.0 |
v0.8.0 | 2021-03-28 | 服务置备,定制对外暴露的数据库服务 | v0.8.0 |
v0.7.0 | 2021-03-01 | 仅监控部署,监控现有 PostgreSQL 实例 | v0.7.0 |
v0.6.0 | 2021-02-19 | 架构增强,将PG与Consul解耦 | v0.6.0 |
v0.5.0 | 2021-01-07 | 支持在配置中定义业务数据库/用户 | v0.5.0 |
v0.4.0 | 2020-12-14 | 支持 PostgreSQL 13,添加官方文档 | v0.4.0 |
v0.3.0 | 2020-10-22 | 虚拟机置备方案正式定稿 | v0.3.0 |
v0.2.0 | 2020-07-10 | PG监控系统第六版正式发布 | v0.2.0 |
v0.1.0 | 2020-06-20 | 在生产仿真测试环境中验证通过 | v0.1.0 |
v0.0.5 | 2020-08-19 | 离线安装模式:无需互联网访问即可交付 | v0.0.5 |
v0.0.4 | 2020-07-27 | 将 Ansible 剧本重构为 Role Refactor playbooks into ansible roles | v0.0.4 |
v0.0.3 | 2020-06-22 | 接口设计改进 | v0.0.3 |
v0.0.2 | 2020-04-30 | 首次提交 | v0.0.2 |
v0.0.1 | 2019-05-15 | 概念原型 | v0.0.1 |
会议与演讲
日期 | 类型 | 活动 | 主题 |
---|---|---|---|
2023-12-20 | 直播辩论 | 开源漫谈第七期 | 上云 or 下云,割韭菜还是降本增效? |
2023-11-24 | 技术大会 | 大模型时代的向量数据库 | 圆桌讨论:大模型时代向量数据库新未来 |
2023-09-08 | 人物专访 | 墨天轮风云人物访谈 | 冯若航:不想当段子手的技术狂,不是一位好的开源创始人 |
2023-08-16 | 技术大会 | DTCC 2023 | DBA之夜:PostgreSQL vs MySQL的开源协议问题 |
2023-08-09 | 直播辩论 | 开源漫谈第一期 | MySQL vs PostgreSQL,谁是世界第一? |
2023-07-01 | 技术大会 | SACC 2023 | 专题研讨会8:FinOps实践:云成本管理与优化 |
2023-05-12 | 线下活动 | PostgreSQL中国社区 温州站线下沙龙 | PG With DB4AI: 向量数据库 PGVECTOR & AI4DB: 数据库自动驾驶 Pigsty |
2023-04-08 | 技术大会 | 数据库嘉年华 2023 | 更好的开源RDS替代:Pigsty |
2023-04-01 | 技术大会 | PostgreSQL中国社区 西安站线下沙龙 | PG高可用与容灾最佳实践 |
2023-03-23 | 公开直播 | Bytebase x Pigsty | 管理 PostgreSQL 的最佳实践: Bytebase x Pigsty |
2023-03-04 | 技术大会 | PostgreSQL中国技术大会 | 炮打 RDS,Pigsty v2.0 发布 |
2023-02-01 | 技术大会 | DTCC 2022 | 开源 RDS 替代:开箱即用、自动驾驶的数据库发行版 Pigsty |
2022-07-21 | 直播辩论 | 云吞噬开源,那开源有机会反击吗? | 云吞噬开源,那开源有机会反击吗? |
2022-07-04 | 人物专访 | 专题采访:创造者说 | 90 后,辞职创业,说要卷死云数据库 |
2022-06-28 | 公开直播 | 贝斯的圆桌趴 |DBA 福音 - | SQL 审核最佳实践 |
2022-06-12 | 公开路演 | 奇绩创坛 S22 路演日 | 好用省钱的数据库发行版 Pigsty |
2022-06-05 | 视频直播 | PG中文社区直播分享 | Pigstyv1.5快速上手新特性介绍与生产集群搭建 |
6 - 加入社区
GitHub
我们的 GitHub 仓库地址是:https://github.com/Vonng/pigsty ,欢迎点个 ⭐️ 关注 我们。
我们欢迎任何人 提交新 Issue 或创建 Pull Request,提出功能建议并参与 Pigsty 贡献。
请注意,关于 Pigsty 文档的问题,请在 github.com/Vonng/pigsty.cc 仓库中提交 Issue。
微信群组
中文区用户主要活跃于微信群组中,目前有七个活跃的群组,1群-4群已经满员,其他群需要添加小助手微信拉入。
加入微信社群,请用搜索 “Pigsty小助手”,(微信号 pigsty-cc
) 备注或发送 “加群” ,小助手会将您拉入群组中。
海外社群
Telegram: https://t.me/joinchat/gV9zfZraNPM3YjFh
Discord: https://discord.gg/j5pG8qfKxU
您也可以通过邮件联系我: [email protected]
社区求助
当您使用 Pigsty 遇到问题时,可以向社区求助。
请参考 社区求助指南 ,尽可能提供足够的信息,以便社区成员帮助您解决问题。以下是求助提问的参考模板:
发生了什么事? (必选项)
Pigsty版本号与操作系统版本号 (必选项)
$ grep version pigsty.yml
$ cat /etc/os-release
一些云厂商对标准操作系统发行版进行了定制,您可以告诉我们使用的是哪一家云厂商的什么操作系统镜像。 如果您在安装操作系统后对环境进行了定制与修改,或者在您的局域网中有特定的安全规则与防火墙配置,也请在提问时告知我们。
Pigsty配置文件
请不要忘记抹掉任何敏感信息:密码,内部密钥,敏感配置等。
cat ~/pigsty/pigsty.yml
你期待发生什么?
请描述正常情况下应该发生什么事情,实际发生的情况与期待的情况有何偏离?
如何复现此问题?
请尽可能详细地告诉我们复现此问题的方法与步骤
监控截图
如果你在使用 Pigsty 提供的监控系统,可以提供 相关 的截图。
错误日志
请尽可能提供与错误有关的日志。请不要粘贴类似“Failed to start xxx service”之类没有帮助的内容。
您可以从 Grafana / Loki 中查询日志,或从以下位置获取日志:
- Syslog:
/var/log/messages
(rhel) or/var/log/syslog
(debian) - Postgres:
/pg/log/postgres/*
- Patroni:
/pg/log/patroni/*
- Pgbouncer:
/pg/log/pgbouncer/*
- Pgbackrest:
/pg/log/pgbackrest/*
journalctl -u patroni
journalctl -u <service name>
您已经搜索过 Issue/网站/FAQ了吗?
在 FAQ 中,我们提供了许多常见问题的解答,请在提问前检查
您也可以从 Github Issue 与 Discussion 中搜索相关问题:
有什么其他信息是我们需要知道的吗?
您提供的信息与上下文越丰富,我们越有可能帮助您解决问题。
7 - 隐私政策
Pigsty软件
当您安装 Pigsty 软件时,如果在网络隔离的环境中使用离线软件包安装,我们不会收到任何关于您的数据。
如果您选择在线安装,那么在下载相关软件包时,我们的服务器或云供应商的服务器会自动在日志中记录来访机器的 IP 地址和/或主机名,和您下载的软件包名称。
除非法律要求,我们不会与其他组织共享这些信息。(实话说也是吃饱了撑着才会去看这些东西)
Pigsty 使用的主域名为:pigsty.io ,中国大陆请使用备案镜像站点 pigsty.cc。
Pigsty网站
当您访问我们的网站时,我们的服务器会自动在 Nginx 日志中记录您的 IP 地址和/或主机名。
仅当您决定通过完成调查或在我们的某个网站上注册为用户来向我们发送此类信息时,我们才会存储您的电子邮件地址、姓名和地点等信息
我们收集这些信息是为了帮助我们改进网站内容、定制网页布局以及出于技术和支持目的联系人员。除非法律要求,我们不会与其他组织共享您的电子邮件地址。
本网站使用 Google Analytics,这是 Google, Inc.(“Google”)提供的一项网络分析服务。谷歌分析使用“cookies”,即放置在您计算机上的文本文件,帮助网站分析用户如何使用该网站。
cookie 生成的有关您使用网站的信息(包括您的 IP 地址)将被传输至 Google 位于美国的服务器并由其存储。谷歌将使用这些信息来评估您对网站的使用情况,为网站运营商编制网站活动报告,并提供与网站活动和互联网使用相关的其他服务。 如果法律要求,或者第三方代表 Google 处理信息,Google 还可能会将此信息传输给第三方。 Google 不会将您的 IP 地址与 Google 持有的任何其他数据关联起来。 您可以通过在浏览器上选择适当的设置来拒绝使用 cookie,但请注意,如果您这样做,您可能无法使用本网站的全部功能。使用本网站即表示您同意 Google 以上述方式和目的处理有关您的数据。
如果您对此政策有任何疑问或意见,或要求删除个人数据,您可以通过发送邮件至 [email protected] 与我们联系
8 - 开源协议
项目协议地址:https://github.com/Vonng/pigsty/blob/main/LICENSE
协议摘要
Pigsty 使用 GNU Affero General Public License v3.0 (AGPLv3) 开源协议,这是一种强制性的 Copyleft 许可证。
如果您通过网络分发、托管或创建 Pigsty 软件的 衍生作品,GNU AGPLv3 许可证要求您也按照相同的 GNU AGPL v3 许可证分发组合作品的完整、相应的源代码。无论您是否修改了 Pigsty 此要求都适用。
本协议授权您:
- 商用
- 修改
- 分发
- 专利授权
- 私人使用
本协议不提供:
- 商标使用权
- 责任与担保
本协议的条件:
- 包含本许可证并显著声明
- 不得修改其开源状态
- 公开源代码
- 通过网络使用属于分发的一种
- 使用同样的协议开源
请注意,Pigsty 的网站 (pigsty.io/pigsty.cc) 本身使用 CC by 4.0 协议,这是一种知识共享许可证, 允许您自由地分享与演绎本站的内容,但是您必须给出适当的署名,提供指向许可证的链接,并指出是否有对原始内容进行了修改。
豁免条款
Pigsty 采用了 AGPLv3 许可证,但对于普通终端用户(即:公有云厂商,数据库厂商除外的用户),执行等效 Apache 2.0 许可证。
普通终端用户可以将 AGPLv3 用于商业目的,提供服务,二次开发,而无需担心许可证问题。 即使普通终端用户对 Pigsty 进行二次开发,并违反了 AGPL 协议没有开源,只要用途在合理范围内,我们不会对此进行追索,并豁免用户的相关开源义务。 在 订阅支持 中,我们可以提供关于责任豁免的书面承诺。
我们支持并欢迎遵循 AGPLv3 协议的 PostgreSQL 服务提供商基于 Pigsty 交付,并提供自己的付费咨询与支持服务,并将二次开发成果回馈上游社区主干。 请注意,Pigsty 的商标与著作权为原作者所有,在提供服务与咨询时,您不应侵犯我们的商标权与著作权。我们提供 OEM 合作方案,详情请参考 商业支持。
为什么使用AGPLv3
AGPLv3 的精神实质是确保用户的软件自由,并通过合法的对公有云厂商的歧视,实现共同体边界的重新划定,将其开除出社区参与之外。
AGPLv3 不影响普通用户的使用:因为使用并不是一种“发布”,您无需操心使用 Pigsty 的业务代码是否需要开源。
当您将 Pigsty 或 Pigsty 的修改作为软件/服务的全部或一部分对外“发布”时,您才需要考虑到 AGPLv3 的约束。
以下是 GNU 官方对 GPL 相关问题的解答:
- 在组织或公司内部使用是不是“发布”?
- GPL是否要求修改版的源代码公开?
- GPL是否允许销售软件的拷贝来赚钱?
- 我写了一个GPL程序的插件,我要发布我的插件的话,我要使用的许可证有什么强制要求?
- 为什么要专门写一个GNU Affero GPLv3作为单独的许可证?
- 在GPLv3和AGPLv3中,“不承担本许可证的任何其他条款”是什么意思?
- 在AGPLv3中,什么应该算作是“通过计算机网络和该软件远程交互?”
- 如果一个网络客户端程序按照AGPLv3发布,那么它是否必须能够向其交互的服务器提供源代码?
- 对于运行代理服务器的AGPL软件,我们怎样才能为和这些程序交互的用户提供源代码?
SBOM清单
本项目所依赖或相关的核心开源软件及其开源协议。340 个 PostgreSQL 扩展插件的许可证请参考 PG扩展列表。
模块 | 软件名称 | 许可证 | 必要性,用途与说明 | 必要性 |
---|---|---|---|---|
PGSQL | PostgreSQL | PostgreSQL License | PostgreSQL 内核 | 必选 |
PGSQL | patroni | MIT License | 提供 PostgreSQL 高可用能力 | 必选 |
ETCD | etcd | Apache License 2.0 | 提供高可用共识与分布式配置存储 | 必选 |
INFRA | Ansible | GPLv3 | 管控工具,执行剧本,发起管控命令 | 必选 |
INFRA | Nginx | BSD-2 | 暴露Web系统界面,提供本地软件源 | 必选 |
PGSQL | pgbackrest | MIT License | 提供 PITR 备份/恢复管理能力 | 建议 |
PGSQL | pgbouncer | ISC License | 提供 PostgreSQL 连接池化能力 | 建议 |
PGSQL | vip-manager | BSD 2-Clause License | 提供自动将 L2 VIP 绑定到 PG 集群主库的能力 | 建议 |
PGSQL | pg_exporter | Apache License 2.0 | 提供监控 PostgreSQL 与 PgBouncer 的能力 | 建议 |
NODE | node_exporter | Apache License 2.0 | 提供主机节点监控能力 | 建议 |
NODE | haproxy | HAPROXY’s License (GPLv2) | 提供负载均衡,对外暴露服务的能力 | 建议 |
INFRA | Grafana | AGPLv3 | 提供数据库可视化平台 | 建议 |
INFRA | Prometheus Stack | Apache License 2.0 | 提供监控时序数据库存储,指标采集与监控告警 | 建议 |
INFRA | Loki | AGPLv3 | 提供集中式日志收集存储查询平台 | 建议 |
INFRA | DNSMASQ | GPLv2 / GPLv3 | 提供DNS解析服务,提供集群名查询能力 | 建议 |
MINIO | MinIO | AGPLv3 | 提供S3兼容的对象存储服务 | 可选 |
NODE | keepalived | MIT License | 提供绑定在节点集群上的 VIP | 可选 |
REDIS | Redis | Redis License (BSD-3) | 搭配PG使用的缓存服务,锁死版本 7.2.6 | 可选 |
REDIS | Redis Exporter | MIT License | 提供 Redis 监控能力 | 可选 |
MONGO | FerretDB | Apache License 2.0 | 提供基于PG的MongoDB兼容能力 | 可选 |
DOCKER | docker-ce | Apache License 2.0 | 提供容器管理能力 | 可选 |
CLOUD | SealOS | Apache License 2.0 | 提供快速部署,复制,打包K8S集群的能力 | 可选 |
DUCKDB | DuckDB | MIT | 提供简单易用的高性能分析能力 | 可选 |
External | Vagrant | Business Source License 1.1 | 拉起本地测试环境虚拟机 | 按需 |
External | Terraform | Business Source License 1.1 | 一键申请云资源用于部署 | 按需 |
External | Virtualbox | GPLv2 | 虚拟机管理软件 | 按需 |
必要性等级说明:
- 必选:提供 Pigsty 关键性核心能力,不提供关闭停用选项
- 建议:Pigsty 默认启用的组件,可以通过配置选项停用
- 可选:Pigsty 默认会下载但不启用的组件,可通过配置启用
- 按需:按需使用的工具,可按需配置下载并启用
协议原文
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
Copyright (C) 2018-2024 Ruohang Feng, Author of Pigsty
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
9 - 赞助我们
天使投资人
Pigsty 是由 奇绩创坛 (原YC中国,MiraclePlus) S22 所投资的项目,感谢奇绩创坛与陆奇博士对本项目的支持!
赞助我们
Pigsty 是一个开源免费的自由软件,由 PostgreSQL 社区成员用热情浇灌而成,旨在整合 PostgreSQL 生态的力量,推广 PostgreSQL 的普及。如果我们的工作帮到了您,请考虑赞助或者支持一下我们的项目:
- 直接打钱赞助我们,用最直接有力的鼓舞表达您的真挚支持!
- 考虑采购我们的技术支持服务,我们可以提供专业的 PostgreSQL 高可用集群部署与维护服务,让您的预算花得物有所值!
- 通过文章,讲座,视频分享您使用 Pigsty 的案例与经验。
- 允许我们在 “这些用户使用了Pigsty” 中提及您的组织。
- 向有需求的朋友,同事与客户提名/推荐我们的项目与服务。
- 关注我们的 微信公众号 并转发相关技术文章至群组与朋友圈。
10 - 订阅服务
Pigsty 旨在聚集PG生态的扩展合力,并用数据库自动驾驶软件替代人肉数据库运维管理,帮助用户用好 PostgreSQL。
我们深知专业的商业支持服务对于企业客户的重要性,因此提供商业支持,帮助用户更好地用好 PostgreSQL 与 Pigsty。
如果您有下列需求,欢迎考虑 Pigsty 订阅服务:
- 在关键场景中运行数据库,需要严格 SLA 保障兜底。
- 希望对 Pigsty 与 PostgreSQL 相关疑难杂症提供兜底。
- 希望获取关于 PostgreSQL / Pigsty 生产环境最佳实践的指导。
- 希望有专家帮助解读监控图表,分析定位性能瓶颈与故障根因,给出意见。
- 希望根据现有资源与业务需求,规划满足安全/容灾/合规要求的数据库架构。
- 需要将其他数据库迁移至 PostgreSQL 数据库,或对历史遗留实例迁移与改造。
- 建设基于Prometheus / Grafana 技术栈的可观测性体系,数据大盘,可视化应用。
- 希望支持国产信创操作系统/国产信创 ARM 芯片架构,提供中文/本地化界面支持。
- 下云并寻求 RDS for PostgreSQL 的开源替代 —— 云中立,无供应商锁定的解决方案。
- 希望获取关于 Redis / ETCD / MinIO / Greenplum / Citus / TimescaleDB 的专业技术支持。
- 希望规避 AGPL v3 协议对衍生作品强制使用同协议开源的的限制,进行二次开发与OEM贴牌。
- 希望将 Pigsty 作为 SaaS / PaaS / DBaaS 对外销售,或基于此发行版提供技术服务/咨询/云服务。
订阅计划
除了 开源版 之外,Pigsty 提供两种不同的订阅服务档位:专业版 与 企业版,您可以根据自身的实际情况与需求选购。
Pigsty 订阅的价格与部署 节点 数量成正比,即与系统复杂度规模绑定,节点可以是物理机,虚拟机,节点的 CPU 数量不影响定价。
节点(Node)数量的定义为: 一套 Pigsty 部署中,配置清单 里作为 Host 存在的独立 IP 地址个数,即由 Pigsty 所纳管的节点总数。
列表单价:30,000 ¥ / 节点·年
起步规模:4 节点 = 120,000 ¥ / 年
许可协议:商业许可证
PG支持:16, 17
架构支持:x86_64
OS支持:五系大小版本
- EL 8 / 9 兼容
- Debian 12
- Ubuntu 22 / 24
功能:所有模块
SLA:工作日时效内响应
提供专家咨询服务:
- 软件缺陷修复
- 疑难杂症分析
- 专家答疑解惑
- 备份合规建议
支持:每年包含 1 人天
交付:离线安装软件包
仓库:中国大陆镜像站
Pigsty开源版
Pigsty 开源版使用 AGPLv3 许可证, 提供了完整核心功能,无需任何费用,但也不承诺任何质保服务。如果您发现了 Pigsty 的缺陷,我们非常欢迎您在 Github 上提出 Issue。
如果您属于普通终端用户(即:公有云厂商,数据库厂商除外的用户),我们实际上执行更宽松的 Apache 2.0 许可证 —— 即使您对 Pigsty 进行二次开发,我们也不会对此进行追索。
针对开源版本,我们提供 PostgreSQL 17 在 EL 9.4,Debian 12.7,Ubuntu 22.04.5 三个精准 OS 发行版小版本的离线安装包,放置于 GitHub Release 页面上,并包含 PostgreSQL 17 及所有适用的扩展插件。
使用 Pigsty 开源版本,可以让初级研发工程师 / 运维工程师拥有一个专业 DBA 70% 的能力,在缺少数据库专家的情况下,也能够轻松搭建一个高可用,高性能,易维护,安全可靠的 PostgreSQL 数据库集群。
代号 | 操作系统发行版版本 | x86_64 |
PG17 | PG16 | PG15 | PG14 | PG13 |
---|---|---|---|---|---|---|---|
EL9 | RHEL 9 / Rocky9 / Alma9 | el9.x86_64 |
|||||
U22 | Ubuntu 22.04 (jammy ) |
u22.x86_64 |
|||||
D12 | Debian 12 (bookworm ) |
d12.x86_64 |
= 首要支持, = 选配支持
Pigsty专业版
专业版订阅价格: ¥ 30,000 / 节点·年,四节点起,起步价格 ¥ 120,000 / 年
Pigsty 专业版订阅提供了完整的功能模块,以及对于 Pigsty 本身的质保。关于 PostgreSQL 本身与扩展插件的缺陷,我们将尽最大努力通过 PostgreSQL 全球开发者社区进行反馈与修复。
Pigsty 专业版构建于开源版基础之上,完全兼容开源版本的所有功能,并提供额外的功能模块,与更为宽广的数据库 / 操作系统版本兼容选项:我们将针对五个主流操作系统发行版的所有小版本提供构建选项。
Pigsty 专业版包含了对最近两个 PostgreSQL 大版本(17,16)的支持,提供两个大版本中的所有可用的扩展插件,确保您可以通过滚动升级的方式,平滑迁移到最新的 PostgreSQL 大版本上。
Pigsty 专业版订阅允许您使用中国大陆镜像站点软件仓库,无需翻墙代理即可访问;同时我们将针对您使用的精准操作系统大小版本定制离线软件安装包,确保在断网环境下也能正常安装交付,真正做到运维自主可控。
Pigsty 专业版订阅提供了标准的专家咨询服务,包括疑难杂症分析,DBA 答疑解惑,备份合规建议等,我们承诺在工作日(5x8)内响应您的问题,并且每年提供 1 人天支持,以及可选的人天加购选项,用于解决各种更为棘手复杂耗时的问题。
Pigsty 专业版使用商业许可证,并提供书面合同承诺的 AGPLv3 开源义务豁免,即使您对 Pigsty 进行二次开发,并违反了 AGPLv3 协议没有开源,我们亦不会对此进行追索。
Pigsty 专业版的定价为 ¥30,000 / 节点·年,四节点起售,最低总价 ¥120,000 / 年,相当于 7 vCPU 的 AWS RDS 或 30 vCPU 的阿里云 RDS,或月薪不足一万元的初级运维工程师。
代号 | 操作系统发行版版本 | x86_64 |
PG17 | PG16 | PG15 | PG14 | PG13 |
---|---|---|---|---|---|---|---|
EL9 | RHEL 9 / Rocky9 / Alma9 | el9.x86_64 |
|||||
EL8 | RHEL 8 / Rocky8 / Alma8 / Anolis8 | el8.x86_64 |
|||||
U24 | Ubuntu 24.04 (noble ) |
u24.x86_64 |
|||||
U22 | Ubuntu 22.04 (jammy ) |
u22.x86_64 |
|||||
D12 | Debian 12 (bookworm ) |
d12.x86_64 |
Pigsty企业版
企业版订阅价格: ¥ 100,000 / 节点·年,四节点起,起步价格 ¥ 400,000 / 年
Pigsty 企业版订阅包含 Pigsty 专业版订阅提供的全部服务内容,和以下增值服务项:
Pigsty 企业版订阅提供最为广泛的数据库/操作系统版本支持范围,包括对过保操作系统(EL7, U20, D11),国产操作系统,云厂商操作系统,以及过保数据库大版本(从 PG 12 开始)的延长支持,以及对 Arm64 架构芯片的支持。
Pigsty 企业版订阅提供了信创,国产化解决方案,允许您在 Pigsty 中使用 PolarDB v2.0 (需单独采购) 内核替换原生 PostgreSQL 内核,以满足国产化合规要求。
Pigsty 企业版订阅提供了更高标准的企业级咨询服务,承诺 7x24 提供 (< 1h) 的响应时间 SLA,并可提供更多种类的咨询支持:版本升级,性能瓶颈定位,年度架构评估,扩展插件收录等。
Pigsty 企业版订阅每年自带 2 人天支持,以及可选的人天加购选项,用于解决各种更为棘手复杂耗时的问题。
Pigsty 企业版的定价为 ¥100,000 / 节点·年,四节点起售,最低总价 ¥400,000 / 年,相当于 24 vCPU 的 AWS RDS 或 100 vCPU 的阿里云 RDS,或月薪 三万元 的运维专家。
代号 | 操作系统发行版版本 | x86_64 |
PG17 | PG16 | PG15 | PG14 | PG13 | PG12 | Arm64 |
PG17 | PG16 | PG15 | PG14 | PG13 | PG12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EL9 | RHEL 9 / Rocky9 / Alma9 | el9.x86_64 |
el9.arm64 |
||||||||||||
EL8 | RHEL 8 / Rocky8 / Alma8 / Anolis8 | el8.x86_64 |
el8.arm64 |
||||||||||||
U24 | Ubuntu 24.04 (noble ) |
u24.x86_64 |
u24.arm64 |
||||||||||||
U22 | Ubuntu 22.04 (jammy ) |
u22.x86_64 |
u22.arm64 |
||||||||||||
D12 | Debian 12 (bookworm ) |
d12.x86_64 |
d12.arm64 |
||||||||||||
D11 | Debian 11 (bullseye ) |
d12.x86_64 |
d11.arm64 |
||||||||||||
U20 | Ubuntu 20.04 (focal ) |
d12.x86_64 |
u20.arm64 |
||||||||||||
EL7 | RHEL7 / CentOS7 / UOS … | d12.x86_64 |
el7.arm64 |
Pigsty订阅说明
功能差异
Pigsty 专业版/企业版相比开源版本,包含以下额外功能:
- 系统定制能力:针对精确的主流Linux操作系统发行版大小版本提供预制的离线安装包
- 离线安装能力:在没有互联网访问的环境中(断网环境)实现 Pigsty 的完整安装
- PG内核多版本:允许用户自由指定并安装 PostgreSQL 生命周期内大版本的内核(13 - 17)
- 内核替换能力:允许用户使用其他 PostgreSQL 系兼容内核,替换原生 PG 内核,以及离线安装这些内核的能力
- Babelfish:提供 Microsoft SQL Server 线缆协议级兼容能力
- IvorySQL:基于 PG 提供 Oracle 语法/类型/存储过程兼容能力
- PolarDB PG:提供基于开源的 PolarDB for PostgreSQL 内核支持
- PolarDB O:信创数据库,满足国产化合规要求的 Oracle 兼容内核(仅限企业版订阅)
- 扩展支持能力:针对 340 个可用 PG Extension,提供 PG 12-17 在主流操作系统上开箱即用的安装能力。
- 完整功能模块:提供所有功能模块:
- 国产操作系统支持:提供国产信创操作系统支持选项(仅限企业版订阅)
- ARM芯片架构支持:提供 ARM64 架构支持选项(仅限企业版订阅)
- 中国大陆镜像仓库:无需科学上网即可顺畅安装,提供境内 YUM/APT 仓库镜像与 DockerHub 访问代理。
- 中文界面支持:监控系统中文版界面支持(Beta)
- 命令行管理工具: Pigsty CLI(Beta)
付费模式
Pigsty 订阅采用按年付费的模式,签订合同后,从合同约定日起计算一年的有效期。订阅合同到期前如果继续打款则视为自动续订 连续订阅有折扣,第一次续签(第二年)享受 95 折优惠,第二次以及后续的续签享受订阅费用 9 折优惠,一次性订阅三年以上整体费用享受 85 折优惠。
在年度订阅合同终止后,您可以选择不续签订阅服务,Pigsty 将不再提供软件更新,技术支持,咨询服务,但您仍然可以继续使用已经安装版本的 Pigsty 专业版软件。 如果您订阅了 Pigsty 专业服务并选择不续订,在重新订阅时无需补齐中断期间的订阅费用,但所有折扣与优惠将重置。
Pigsty 的定价策略确保用户物有所值 —— 您可以立即获得顶尖DBA的数据库架构建设方案与管理最佳实践,并由其提供咨询答疑与服务支持兜底; 而付出的成本相比于全职雇佣数据库专家或使用云数据库极具竞争力。一些企业级数据库专业服务市场定价参考:
- AWS RDS for PostgreSQL 高可用版:¥1,160 ~ ¥1,582 / (vCPU·月) ,折合人民币 14K ~ 19K/年 (每vCPU)
- 阿里云 RDS for PostgreSQL 高可用版:¥270 ~ ¥432 / (vCPU·月),折合人民币 3K ~ 5K/年 (每vCPU)
- EDB PostgreSQL 云数据库企业版: $183.3 / (vCPU·月),折合人民币 16K/年 (每vCPU)
- 富士通企业级 PostgreSQL Kubernetes: $3200 / (Core·年),折合人民币 12K/年 (每vCPU)
- Oracle 年度服务费: (Enterprise $47,500 + Rac $23,000) * 22% 每年,折合人民币 28K /年 (每vCPU)
体面数据库专业服务的公允价格是 1 ~ 2 万元 / 年,计费单位为 vCPU,即一个 CPU 线程(1 Intel 核 = 2 vCPU 线程)。 而 Pigsty 提供国内顶尖的 PostgreSQL 专家服务,并采用 按节点计费 的模式,在当下常见的高核数服务器节点上,能为用户带来无可比拟的降本增效体验。
Pigsty专家服务
除了 Pigsty 订阅,Pigsty 还提供按需采购的 Pigsty x PostgreSQL 专家服务 —— 业界顶级数据库专家坐堂问诊。
专家顾问:12万¥ - 40万¥ / 年 起
业内顶级数据库专家作为您的顾问,提供不限次数,不限范围,带有响应时效 SLA 约定的的专家咨询服务。仅以 Pigsty 订阅的形式提供。
专家支持:30,000 ¥ / 人·天
业界顶级专家现场支持,可用于架构咨询,故障分析,问题排查,数据库体检,监控解读,迁移评估,教学培训,上下云参谋等连续耗时场景。
专家咨询:2000 ¥ / 半小时
咨询任何您想要了解的问题,关于 Pigsty, PostgreSQL,数据库,云计算的问题。 数据库老司机,云计算泥石流与您分享行业顶级洞察、认知与研判。
专家号:200 ¥ / 问题
给出一个关于 PostgreSQL / Pigsty / 数据库相关的问题的快速诊断意见与答复,不超过 5 分钟。
联系方式
请发送邮件至 [email protected] 。中国大陆地区用户欢迎添加微信号 RuohangFeng
。