文档 扩展 博客 服务 English GitHub

PostgreSQL In Great STYle

开箱即用的企业级开源 PostgreSQL 数据库发行版 自带高可用,PITR,IaC,监控,及 464 PG 扩展

$ curl -fsSL https://repo.pigsty.cc/get | bash
Pigsty Architecture

像专家一样自建 PostgreSQL

Pigsty 为您提供企业级 PostgreSQL 服务所需的全套工具与方案,开源免费

高可用标杆架构

故障自愈,高枕无忧

  • 基于 Patroni + Etcd 自动故障切换,HAProxy 流量自动均衡
  • 预置 pgBackRest PITR 时间点恢复,删库跑路也能找回数据
  • 内置 SSL/TLS 加密与访问控制模型,SELinux 防火墙全搞定
告别半夜故障值班 OnCall,硬件故障睡醒起来再修复
Pigsty HA Architecture

基础设施即代码

言出法随,一键部署

  • 用配置声明你想要的状态,Pigsty 帮你实现,无需操心复杂细节
  • 海量可选定制选项,生产开发测试共享一套架构,仅有配置不同
  • Ansible 幂等剧本,无需 K8s 与 Docker,裸机也能玩转云原生
一键复刻完整生产环境,单枪匹马管理海量集群

可观测性技术栈

洞若观火,尽在掌握

  • 基于 Grafana + Victoria 的 SOTA 可观测性技术栈
  • 3000+ 监控指标,40+ 精调仪表盘,免配置开箱即用
  • 可独立部署使用,监控现有 RDS / PostgreSQL 实例
快速定位问题,数据驱动决策,告别空对空无效扯皮
Pigsty Monitoring Dashboard

数据库扩展生态

海纳百川,开箱即用

  • 464 PostgreSQL 扩展,覆盖 14 大 Linux 发行版,即装即用
  • 12 种 PG 内核:兼容 Oracle、MySQL、SQL Server、Mongo…
  • 功能模块:MinIO、Redis、Ferret、Docker、Supabase 自建
灵活组合搭配,自由按需拼接,完全自主可控
PostgreSQL Extension Ecosystem

12+ 内核分支,464 扩展插件

Pigsty 为您解锁 PostgreSQL RDS 的无限可能

timescaledb timescaledb_toolkit pg_timeseries periods temporal_tables emaj table_version pg_cron pg_task pg_later pg_background postgis pgrouting pointcloud pg_h3 q3c ogr_fdw geoip pg_polyline pg_eviltransform pg_geohash mobilitydb pg_tzf earthdistance pgvector vchord pgvectorscale pg_vectorize pg_similarity smlar pg_summarize pg_tiktoken pg4ml pgml pg_search pgroonga pg_bigm zhparser pg_bestmatch vchord_bm25 pg_tokenizer pg_biscuit pg_textsearch pg_pinyin hunspell_cs_cz hunspell_de_de hunspell_en_us hunspell_fr hunspell_ne_np hunspell_nl_nl hunspell_nn_no hunspell_pt_pt hunspell_ru_ru hunspell_ru_ru_aot fuzzystrmatch pg_trgm citus hydra pg_analytics pg_duckdb pg_mooncake pg_clickhouse duckdb_fdw pg_parquet pg_fkpart pg_partman plproxy pg_strom tablefunc age hll rum pg_ai_query pg_ttl_index pg_graphql pg_jsonschema jsquery pg_hint_plan hypopg index_advisor pg_plan_filter imgsmlr pg_ivm pg_incremental pgmb pgmq pgq orioledb pg_cardano rdkit omnigres bloom pg_tle plv8 pljs pllua plprql pldebugger timescaledb timescaledb_toolkit pg_timeseries periods temporal_tables emaj table_version pg_cron pg_task pg_later pg_background postgis pgrouting pointcloud pg_h3 q3c ogr_fdw geoip pg_polyline pg_eviltransform pg_geohash mobilitydb pg_tzf earthdistance pgvector vchord pgvectorscale pg_vectorize pg_similarity smlar pg_summarize pg_tiktoken pg4ml pgml pg_search pgroonga pg_bigm zhparser pg_bestmatch vchord_bm25 pg_tokenizer pg_biscuit pg_textsearch pg_pinyin hunspell_cs_cz hunspell_de_de hunspell_en_us hunspell_fr hunspell_ne_np hunspell_nl_nl hunspell_nn_no hunspell_pt_pt hunspell_ru_ru hunspell_ru_ru_aot fuzzystrmatch pg_trgm citus hydra pg_analytics pg_duckdb pg_mooncake pg_clickhouse duckdb_fdw pg_parquet pg_fkpart pg_partman plproxy pg_strom tablefunc age hll rum pg_ai_query pg_ttl_index pg_graphql pg_jsonschema jsquery pg_hint_plan hypopg index_advisor pg_plan_filter imgsmlr pg_ivm pg_incremental pgmb pgmq pgq orioledb pg_cardano rdkit omnigres bloom pg_tle plv8 pljs pllua plprql pldebugger
plpgsql_check plprofiler plsh pljava plr plxslt pgtap faker dbt2 pltcl plperl plperlu plpgsql plpython3u pg_prefix pg_semver pgunit pgpdf pglite_fusion md5hash asn1oid pg_roaringbitmap pgfaceting pgsphere pg_country pg_xenophile pg_currency pgcollection pgmp numeral pg_rational pguint pg_uint128 hashtypes ip4r pg_duration pg_uri pg_emailaddr pg_acl debversion pg_rrule timestamp9 chkpass isn seg cube ltree hstore citext xml2 pg_gzip pg_bzip pg_zstd pg_http pg_net pg_curl pg_retry pgjq pgjwt pg_smtp_client pg_html5_email_address url_encode pgsql_tweaks pg_extra_time pgpcre icu_ext pgqr pg_protobuf pg_envvar floatfile pg_render pg_readme ddl_historization data_historization pg_schedoc pg_hashlib pg_xxhash shacrypt cryptint pg_ecdsa pgsparql pg_idkit pgx_ulid pg_uuidv7 permuteseq pg_hashids sequential_uuids pg_typeid snowflake topn quantile lower_quantile count_distinct omnisketch ddsketch vasco pgxicor pg_weighted_statistics tdigest first_last_agg extra_window_functions plpgsql_check plprofiler plsh pljava plr plxslt pgtap faker dbt2 pltcl plperl plperlu plpgsql plpython3u pg_prefix pg_semver pgunit pgpdf pglite_fusion md5hash asn1oid pg_roaringbitmap pgfaceting pgsphere pg_country pg_xenophile pg_currency pgcollection pgmp numeral pg_rational pguint pg_uint128 hashtypes ip4r pg_duration pg_uri pg_emailaddr pg_acl debversion pg_rrule timestamp9 chkpass isn seg cube ltree hstore citext xml2 pg_gzip pg_bzip pg_zstd pg_http pg_net pg_curl pg_retry pgjq pgjwt pg_smtp_client pg_html5_email_address url_encode pgsql_tweaks pg_extra_time pgpcre icu_ext pgqr pg_protobuf pg_envvar floatfile pg_render pg_readme ddl_historization data_historization pg_schedoc pg_hashlib pg_xxhash shacrypt cryptint pg_ecdsa pgsparql pg_idkit pgx_ulid pg_uuidv7 permuteseq pg_hashids sequential_uuids pg_typeid snowflake topn quantile lower_quantile count_distinct omnisketch ddsketch vasco pgxicor pg_weighted_statistics tdigest first_last_agg extra_window_functions
floatvec aggs_for_vecs aggs_for_arrays pg_csv pg_arraymath pg_math pg_random pg_base36 pg_base62 pg_base58 pg_financial pg_convert refint autoinc insert_username moddatetime tsm_system_time dict_xsyn tsm_system_rows tcn uuid-ossp btree_gist btree_gin intarray intagg dict_int unaccent pg_repack pg_rewrite pg_squeeze pg_dirtyread pgfincore pg_cooldown pg_ddlx pglinter pg_prioritize pg_checksums pg_readonly pgdd pg_permissions pgautofailover pg_catcheck preprepare pg_upless pgcozy pg_orphaned pg_crash pg_cheat_funcs pg_fio pg_qos pg_savior safeupdate pg_strict pg_drop_events table_log pgagent pg_prewarm pgpool lo basic_archive basebackup_to_shell old_snapshot adminpack amcheck pg_surgery pg_profile pg_tracing pg_show_plans pg_stat_kcache pg_stat_monitor pg_qualstats pg_store_plans pg_track_settings pg_track_optimizer pg_wait_sampling pgsentinel system_stats pg_meta pgnodemx pg_sqlog bgw_replstatus pgmeminfo toastinfo pg_explain_ui pg_relusage pagevis powa pg_overexplain pg_logicalinspect pageinspect pgrowlocks sslinfo pg_buffercache pg_walinspect pg_freespacemap pg_visibility pgstattuple auto_explain pg_stat_statements floatvec aggs_for_vecs aggs_for_arrays pg_csv pg_arraymath pg_math pg_random pg_base36 pg_base62 pg_base58 pg_financial pg_convert refint autoinc insert_username moddatetime tsm_system_time dict_xsyn tsm_system_rows tcn uuid-ossp btree_gist btree_gin intarray intagg dict_int unaccent pg_repack pg_rewrite pg_squeeze pg_dirtyread pgfincore pg_cooldown pg_ddlx pglinter pg_prioritize pg_checksums pg_readonly pgdd pg_permissions pgautofailover pg_catcheck preprepare pg_upless pgcozy pg_orphaned pg_crash pg_cheat_funcs pg_fio pg_qos pg_savior safeupdate pg_strict pg_drop_events table_log pgagent pg_prewarm pgpool lo basic_archive basebackup_to_shell old_snapshot adminpack amcheck pg_surgery pg_profile pg_tracing pg_show_plans pg_stat_kcache pg_stat_monitor pg_qualstats pg_store_plans pg_track_settings pg_track_optimizer pg_wait_sampling pgsentinel system_stats pg_meta pgnodemx pg_sqlog bgw_replstatus pgmeminfo toastinfo pg_explain_ui pg_relusage pagevis powa pg_overexplain pg_logicalinspect pageinspect pgrowlocks sslinfo pg_buffercache pg_walinspect pg_freespacemap pg_visibility pgstattuple auto_explain pg_stat_statements
passwordcheck_cracklib supautils pgsodium pg_vault pg_session_jwt pg_anon pgsmcrypto pg_enigma pgaudit pgauditlogtofile pg_auditor logerrors pg_auth_mon pg_jobmon credcheck pgcryptokey pg_pwhash login_hook set_user pg_snakeoil pgextwlist sslutils pg_noset pg_tde sepgsql auth_delay pgcrypto passwordcheck wrappers multicorn odbc_fdw jdbc_fdw pgspider_ext mysql_fdw oracle_fdw tds_fdw db2_fdw sqlite_fdw pgbouncer_fdw etcd_fdw informix_fdw nominatim_fdw mongo_fdw redis_fdw pg_redis_pubsub kafka_fdw hdfs_fdw firebird_fdw aws_s3 log_fdw dblink file_fdw postgres_fdw documentdb orafce pgtt session_variable pg_statement_rollback ivorysql pg_dbms_metadata pg_dbms_lock pg_dbms_job pg_dbms_errlog pg_utl_smtp babelfish spat pgmemcache openhalo pglogical pglogical_ticker pgl_ddl_deploy pg_failover_slots db_migrator pgactive spock lolor wal2json wal2mongo decoderbufs decoder_raw mimeo repmgr pg_fact_loader pg_bulkload test_decoding pgoutput passwordcheck_cracklib supautils pgsodium pg_vault pg_session_jwt pg_anon pgsmcrypto pg_enigma pgaudit pgauditlogtofile pg_auditor logerrors pg_auth_mon pg_jobmon credcheck pgcryptokey pg_pwhash login_hook set_user pg_snakeoil pgextwlist sslutils pg_noset pg_tde sepgsql auth_delay pgcrypto passwordcheck wrappers multicorn odbc_fdw jdbc_fdw pgspider_ext mysql_fdw oracle_fdw tds_fdw db2_fdw sqlite_fdw pgbouncer_fdw etcd_fdw informix_fdw nominatim_fdw mongo_fdw redis_fdw pg_redis_pubsub kafka_fdw hdfs_fdw firebird_fdw aws_s3 log_fdw dblink file_fdw postgres_fdw documentdb orafce pgtt session_variable pg_statement_rollback ivorysql pg_dbms_metadata pg_dbms_lock pg_dbms_job pg_dbms_errlog pg_utl_smtp babelfish spat pgmemcache openhalo pglogical pglogical_ticker pgl_ddl_deploy pg_failover_slots db_migrator pgactive spock lolor wal2json wal2mongo decoderbufs decoder_raw mimeo repmgr pg_fact_loader pg_bulkload test_decoding pgoutput

为各行各业所信赖

探探
Bilibili
Airwallex
Momenta
美图
PolarDB
Bitdeer
OCI
华峰
Linkfog
Motphys
影视飓风
探探
Bilibili
Airwallex
Momenta
美图
PolarDB
Bitdeer
OCI
华峰
Linkfog
Motphys
影视飓风
我们用 Pigsty 管理了上百套 PostgreSQL 集群,250 万 PG QPS
只用了 1.5 个 DBA,总 TCO 成本是公有云的 5% —— 探探

加入社区

看看大家怎么说

Ruohang Feng
Ruohang Feng
Founder @ Pigsty

"Pigsty is a software written to solve our own problems. And it does it well. So we open-sourced it and hope it can help you too."

Vedran B.
Vedran B.
Junior DBA & Full-Stack Developer

"This is cool and long overdue: The official PostgreSQL extension manager (called pig) has been released and it seems supported by the official PostgreSQL org. So, no more tedious digging through outdated readmes, cryptic configure scripts, or random GitHub forks & patches just to install some required extension. We are all pigs now."

Terry Zheng
Terry Zheng
Senior Software Engineer

"Pigsty is a better local open source RDS for PostgreSQL alternative. I wonder if there anything similar for Redis and MySQL."

Darragh ORiordan
Darragh ORiordan
Principal Engineer & Cloud Architect

"If you ever have to set up a postgres instance for production outside of RDS/Managed, Pigsty is a brilliant implementation"

Grzegorz Głąb
Grzegorz Głąb
Spiritus Movens / Serendipitous Planner

"Great toolbox: Pigsty - 'PostgreSQL In Great STYle': Postgres, Infras, Graphics, Service, Toolbox, it's all Yours."

Paul Hewson
Paul Hewson
Data Scientist / Statistician

"This is neat, self hosted PostgreSQL as a service"

François-Guillaume Ribreau
François-Guillaume Ribreau
Hacker, Maker, Tech Advisor

"Looking for a self-hosted PostgreSQL RDS alternative? You won't believe what this project does"

Ruohang Feng
Ruohang Feng
Founder @ Pigsty

"Pigsty is a software written to solve our own problems. And it does it well. So we open-sourced it and hope it can help you too."

Vedran B.
Vedran B.
Junior DBA & Full-Stack Developer

"This is cool and long overdue: The official PostgreSQL extension manager (called pig) has been released and it seems supported by the official PostgreSQL org. So, no more tedious digging through outdated readmes, cryptic configure scripts, or random GitHub forks & patches just to install some required extension. We are all pigs now."

Terry Zheng
Terry Zheng
Senior Software Engineer

"Pigsty is a better local open source RDS for PostgreSQL alternative. I wonder if there anything similar for Redis and MySQL."

Darragh ORiordan
Darragh ORiordan
Principal Engineer & Cloud Architect

"If you ever have to set up a postgres instance for production outside of RDS/Managed, Pigsty is a brilliant implementation"

Grzegorz Głąb
Grzegorz Głąb
Spiritus Movens / Serendipitous Planner

"Great toolbox: Pigsty - 'PostgreSQL In Great STYle': Postgres, Infras, Graphics, Service, Toolbox, it's all Yours."

Paul Hewson
Paul Hewson
Data Scientist / Statistician

"This is neat, self hosted PostgreSQL as a service"

François-Guillaume Ribreau
François-Guillaume Ribreau
Hacker, Maker, Tech Advisor

"Looking for a self-hosted PostgreSQL RDS alternative? You won't believe what this project does"

Anirudha S.
Anirudha S.
Enterprise Architect

"Pigsty aims to harness the collective power of PostgreSQL ecosystem extensions and democratize access to production-grade database services and with GCP a great start ahead!"

Marcin Gwóźdź
Marcin Gwóźdź
Director of FerretDB

"You can easily now use FerretDB with Pigsty: the a battery-included, local-first, open-source RDS PG alternative."

Peter Zaitsev
Peter Zaitsev
Entrepreneur | Technologist

"Pigsty: PostgreSQL in Great STYle, Battery-Included Free RDS Alternative!"

Philippe Noël
Philippe Noël
Founder @ ParadeDB

"Proud for @ParadeDB to be included in Pigsty! Pigsty is truly one of the best ways to run Postgres and its whole ecosystem. Probably the more comprehensive list of extensions in Postgres"

Broken Mind
Broken Mind
Cognitive Sys Optimization Engineer

"man... this is so fun, the open source community always have the gold, is the postgres the best!! awesome work from the last released! a bunch of extensions to help community"

ɘɿuɔɐɿɈ
ɘɿuɔɐɿɈ
Architect

"I want to take a moment to express my immense gratitude to the dedicated developers, maintainers, and contributors of the Pigsty project - a remarkable repository."

Yurii Rashkovskii
Yurii Rashkovskii
Founder @ Omnigres

"Pigsty Is Postgres All Batteries Included. Did I say All? No, it's a little bit more than that."

Anirudha S.
Anirudha S.
Enterprise Architect

"Pigsty aims to harness the collective power of PostgreSQL ecosystem extensions and democratize access to production-grade database services and with GCP a great start ahead!"

Marcin Gwóźdź
Marcin Gwóźdź
Director of FerretDB

"You can easily now use FerretDB with Pigsty: the a battery-included, local-first, open-source RDS PG alternative."

Peter Zaitsev
Peter Zaitsev
Entrepreneur | Technologist

"Pigsty: PostgreSQL in Great STYle, Battery-Included Free RDS Alternative!"

Philippe Noël
Philippe Noël
Founder @ ParadeDB

"Proud for @ParadeDB to be included in Pigsty! Pigsty is truly one of the best ways to run Postgres and its whole ecosystem. Probably the more comprehensive list of extensions in Postgres"

Broken Mind
Broken Mind
Cognitive Sys Optimization Engineer

"man... this is so fun, the open source community always have the gold, is the postgres the best!! awesome work from the last released! a bunch of extensions to help community"

ɘɿuɔɐɿɈ
ɘɿuɔɐɿɈ
Architect

"I want to take a moment to express my immense gratitude to the dedicated developers, maintainers, and contributors of the Pigsty project - a remarkable repository."

Yurii Rashkovskii
Yurii Rashkovskii
Founder @ Omnigres

"Pigsty Is Postgres All Batteries Included. Did I say All? No, it's a little bit more than that."

Dexter Yang
Dexter Yang
Architect, Hacker

"Pigsty, which adopts the currently popular 'fair-code' model for IaaS / PaaS / BaaS / Serverless DB. Unlike M3O (an 'AWS alternative' project) that's geared more toward developers, pigsty is squarely aimed at dba / ops teams."

Vitaliy Kukharik
Vitaliy Kukharik
Founder & CTO @ Autobase

"If you haven't heard about Pigsty extension repository yet, take a look at this. A lot of extremely useful work has been done! Thanks Vonng for this contribution."

Grant Zhou
Grant Zhou
President at Highgo Software

"You can use Pigsty to serve IvorySQL - Oracle compatible PostgreSQL fork as a local-first RDS"

Digoal Zhou
Digoal Zhou
PostgreSQL Expert

"Pigsty is ideal for managing multiple PG or PolarDB databases, especially if you have extensive extension requirements. Highly recommended!"

Steven Lee
Steven Lee
Author of duckdb_fdw

"Thanks for including the duckdb_fdw in Pigsty. Hope to see more extensions in the future!"

Vignesh Ravichandran
Vignesh Ravichandran
Postgres Contributor

"IMHO, Pigsty is underrated. It deserves more visibility. Production grade @PostgreSQL but with full control !"

Bo Hu
Bo Hu
Co-founder of FeatBit

"Pigsty boosts our PostgreSQL expertise and ensures critical use cases for FeatBit's PostgreSQL solution are rock-solid."

Dexter Yang
Dexter Yang
Architect, Hacker

"Pigsty, which adopts the currently popular 'fair-code' model for IaaS / PaaS / BaaS / Serverless DB. Unlike M3O (an 'AWS alternative' project) that's geared more toward developers, pigsty is squarely aimed at dba / ops teams."

Vitaliy Kukharik
Vitaliy Kukharik
Founder & CTO @ Autobase

"If you haven't heard about Pigsty extension repository yet, take a look at this. A lot of extremely useful work has been done! Thanks Vonng for this contribution."

Grant Zhou
Grant Zhou
President at Highgo Software

"You can use Pigsty to serve IvorySQL - Oracle compatible PostgreSQL fork as a local-first RDS"

Digoal Zhou
Digoal Zhou
PostgreSQL Expert

"Pigsty is ideal for managing multiple PG or PolarDB databases, especially if you have extensive extension requirements. Highly recommended!"

Steven Lee
Steven Lee
Author of duckdb_fdw

"Thanks for including the duckdb_fdw in Pigsty. Hope to see more extensions in the future!"

Vignesh Ravichandran
Vignesh Ravichandran
Postgres Contributor

"IMHO, Pigsty is underrated. It deserves more visibility. Production grade @PostgreSQL but with full control !"

Bo Hu
Bo Hu
Co-founder of FeatBit

"Pigsty boosts our PostgreSQL expertise and ensures critical use cases for FeatBit's PostgreSQL solution are rock-solid."

轻松交付,立等可取

curl https://pigsty.cc/get | bash
./configure
./deploy.yml
支持系统: Linux x86_64 / Arm64 · EL 8 / 9 / 10 · Ubuntu 22 / 24 · Debian 12 / 13