PostgreSQL Awesome
约 3 分钟阅读
标签:资源精选
扩展插件功能
- 数据功能 - 数据类型、操作类型、索引类型
- 服务功能 - 集群、cron、存储引擎
- 查询能力 - 图、流、GIS
- 集成功能 - Redis、ES
- 语言功能 - JS、Lua、Java
- neondatabase/neonGitHubneondatabase/neonneondatabase/neon · Rust, Apache 2.0 · serverless PostgreSQL · alternative to AWS Aurora Postgres · 分离存储和计算笔记:neon
- Apache-2.0, Rust
- Serverless Postgres
- pg-sharding/spqrGitHubpg-sharding/spqr
- BSD, PostgreSQL License, Go
- Stateless Postgres Query Router
- orioledb/orioledb笔记OrioleDBorioledb/orioledb · storage engine · slide · HN · author akorotkov · | pg | oriole | · | Block-level WAL | Row-level WAL |打开:/notes/db/relational/postgresql/orioledb
- storage engine
- slide
- HNHacker NewsHacker News #30462695Hacker News author akorotkov
- Vonng/pigstyGitHubVonng/pigsty
- Apache-2.0
- 国产
- Battery-Included Distribution for PostgreSQL
- MaterializeInc/materializeGitHubMaterializeInc/materialize
- 实时增量固化查询
- Superbase
- PostgresApp/PostgresAppGitHubPostgresApp/PostgresApp
- macOS 应用
- secp256k1-sha256/postgres-compatibility-indexGitHubsecp256k1-sha256/postgres-compatibility-index
- PostgreSQL Compatibility Index
- 对比 PostgreSQL 兼容性
- postgres.is
- PipelineDB - 停止
- DB to API
- PostgrestGitHubbegriffs/postgrest
- REST API for any Postgres database
- pRestGitHubprest/prestpRest · MIT, Golang · PostgreSQL 9.5+ · https://docs.prestd.com/get-started/configuring-prest笔记:prest
- Golang
- GET
- query
- _page, _page_size, _select=FIELD, _count=FIELD_NAME, _count_first=true, _renderer=xml, _distinct=true, _order=-FIELD, _groupby=FIELD, _FIELD=VALUE
- _join
- aggregation - SUM, AVG, MAX, MIN, STDDEV, VARIANCE
- sum
- op -
$eq- gt,gte,lt,lte,ne,in,nin,null,notnull,true,nottrue,false,notfalse,like,ilike,nilike,ltreelanc, ltreerdesc,ltreematch,ltreematchtxt
- query
- supabase
- Hasura
- PostgrestGitHubbegriffs/postgrest
- Variants/Docker images
- chumaky/docker-imagesGitHubchumaky/docker-images
- supabase/postgres笔记Supabase PostgreSQL Imagesupabase/postgres · Docker 镜像 · 使用 ansible 构建 · 250MB - 300MB · 包含大多插件 · 版本号匹配 Postgres · 基础镜像为 postgres · Dockerfile · 扩展打开:/notes/db/relational/postgresql/postgres-supabase
- cloudnative-pg/postgres-containersGitHubcloudnative-pg/postgres-containers
- minimal
- official
- standard
- pgaudit, pg failover slots, pgvector
system
- minimal
Extension
- TimescaleDB
- Mooncake-Labs/pg_mooncakeGitHubMooncake-Labs/pg_mooncake
- MIT, C++
- columnar storage, vectorized execution (DuckDB)
- Columnstore tables are stored as Iceberg or Delta Lake
- apache/incubator-ageGitHubapache/incubator-age
- Graph + Realtime
- openCypher
- 受 AgensGraph 启发
- arkhipov/temporal_tablesGitHubarkhipov/temporal_tables
- Temporal - 记录数据变化
- 将数据修改归档到历史表
- 暂不支持 PG13
- zombodb/zombodbGitHubzombodb/zombodb
- 集成 ES 搜索和分析能力
- ankane/pgvectorGitHubankane/pgvector
- 向量搜索
- pgaudit/pgauditGitHubpgaudit/pgaudit
- supabase/supa_auditGitHubsupabase/supa_audit
- Generic Table Auditing
- 纯 SQL
- Postgres Auditing in 150 lines of SQL
- wasmerio/wasmer-postgresGitHubwasmerio/wasmer-postgres
- pgq/pgqGitHubpgq/pgq
- Queue for PostgreSQL
- knizhnik/imcsGitHubknizhnik/imcs
- In-Memory Columnar Store
- OLAP
- heterodb/pg-stromGitHubheterodb/pg-strom
- accelerate mostly batch and analytics workloads with utilization of GPU and NVME-SSD
- tembo-io/pgmqGitHubtembo-io/pgmq
- PostgreSQL, Rust
- lightweight message queue
- NikolayS/PgQueGitHubNikolayS/PgQue
- 基于 PostgreSQL 的轻量队列,使用 SQL 文件安装并通过 pg_cron 驱动。
PL
- plv8/plv8GitHubplv8/plv8plv8/plv8 · 减少代码执行量 · e.g. 4500 loc, 300ms -> 3ms · 因为 PostgreSQL 使用 forking model,因此不会有真正的全局上下文,每个 context 会在 connection 关闭时销毁。笔记:plv8
- pllua/plluaGitHubpllua/pllua
- tada/pljavaGitHubtada/pljava
参考
- Implementing Incremental View Maintenance for PostgreSQL
- HNHacker NewsHacker News #28425379Hacker News
- Waiting for PostgreSQL 14 – Improvements for handling large number of connections
- Audit
Internal
- postgrespro.com/community/books/internals
- HN #32088316Hacker NewsHacker News #32088316Hacker News
- www.interdb.jp/pg/index.html
- vishesh92/pg-primerGitHubvishesh92/pg-primer
工具
- pgmodeler.io
- ankane
- ankane/pgheroGitHubankane/pghero
- ankane/dexterGitHubankane/dexter
- automatic indexer
- ankane/pgsliceGitHubankane/pgslice
- keithf4/pg_bloat_checkGitHubkeithf4/pg_bloat_check
- WAL
- wal-g/wal-gGitHubwal-g/wal-gwal-g/wal-g 是什么? · Apache 2.0, lzo 部分 GPL 3.0+ · PostgreSQL 备份、恢复工具 · WAL-E 后继 - Golang 重写 Python - 性能 x4 · 支持 PostgreSQL, MySQL/MariaDB, Mongo, FoundationDB, Redis, Greenplum笔记:WAL-G
- Apache-2.0, Golang
- vs wal-e
- LZ4, LZMA, Brotli
- 多核处理
- Introducing WAL-G by Citus: Faster Disaster Recovery for Postgres
- wal-e/wal-eGitHubwal-e/wal-e
- BSD-3, Python
- 不再维护
- wal-g/wal-gGitHubwal-g/wal-gwal-g/wal-g 是什么? · Apache 2.0, lzo 部分 GPL 3.0+ · PostgreSQL 备份、恢复工具 · WAL-E 后继 - Golang 重写 Python - 性能 x4 · 支持 PostgreSQL, MySQL/MariaDB, Mongo, FoundationDB, Redis, Greenplum笔记:WAL-G
- Web
Scale
- yandex/odysseyGitHubyandex/odysseyyandex/odyssey - BSD 3 · 多线程 · Transaction pooling · 断开链接时支持 cancel 或 rollback · 客户端复用上次链接 · Database+User 纬度 pooling 控制笔记:Odyssey
- pgbouncer
- postgresml/pgcatGitHubpostgresml/pgcat
- MIT, Rust
- sharding, load balancing, failover
- pg-sharding/spqrGitHubpg-sharding/spqr
- Stateless Postgres Query Router
- awslabs/pgbouncer-rr-patchGitHubawslabs/pgbouncer-rr-patch
- agroal/pgagroalGitHubagroal/pgagroal
- connection pool
- Replication, Clustering, and Connection Pooling
Sync
- ankane/pgsyncGitHubankane/pgsync
- Ruby
- sync table
- toluaina/pgsyncGitHubtoluaina/pgsync
- to elasticsearch
- eulerto/wal2jsonGitHubeulerto/wal2json
- jackc/pglogreplGitHubjackc/pglogrepl
- PostgreSQL logical replication library for Go
Scale Stories
- Herding elephants: Lessons learned from sharding Postgres at Notion
- HNHacker NewsHacker News #28776786Hacker News
- The data model behind Notion's flexibility
- Database “sharding” came from UO?
- PostgreSQL at Scale: Database Schema Changes Without Downtime
- Why you don’t want to shard.
- Transaction ID Wraparound in Postgres
- Re-architecting Slack’s Workspace Preferences: How to Move to an EAV Model to Support Scalability
- PostgreSQL at Scale: Database Schema Changes Without Downtime
- HNHacker NewsHacker News #30458580Hacker News
- retool How we upgraded our 4TB Postgres database
- HNHacker NewsHacker News #31084147Hacker News
- The growing pains of database architecture
- AWS 最大实例 r5.24xlarge
- 96C 768GiB 25Gbps
- 加了 PgBouncer
- 水平扩容
FDW
FAQ
HA vs Horizontal Scale
- HA
- 可以是 master-master 方式
- 可以是 master-slave 方式
- 但每个节点是完整数据
- 强调可用
- HS
- 每个节点数据不是完整的 - sharding
- 目前只有 citus 提供这样的能力
- 强调 partation
- 增加节点
关联信息
反向链接、本文链接的其他页面和外部资料。
反向链接
- Database Awesome笔记 · PostgreSQL Awesome
| name | stand for | · | Relational DBMS | 关系型数据库 | · | Key-value stores | KV 存储 | · | Document stores | 文档存储 | · | Time Series DBMS | 时序数据库 |
站内链接
- OrioleDB笔记 · orioledb/orioledb
orioledb/orioledb · storage engine · slide · HN · author akorotkov · | pg | oriole | · | Block-level WAL | Row-level WAL |
- Supabase PostgreSQL Image笔记 · supabase/postgres
supabase/postgres · Docker 镜像 · 使用 ansible 构建 · 250MB - 300MB · 包含大多插件 · 版本号匹配 Postgres · 基础镜像为 postgres · Dockerfile · 扩展
参考资料
GitHub43 条
- pg-sharding/spqrgithub.com/pg-sharding/spqr
- agroal/pgagroalgithub.com/agroal/pgagroal
- ankane/dextergithub.com/ankane/dexter
- ankane/pgherogithub.com/ankane/pghero
- ankane/pgslicegithub.com/ankane/pgslice
- ankane/pgsyncgithub.com/ankane/pgsync
- ankane/pgvectorgithub.com/ankane/pgvector
- apache/incubator-agegithub.com/apache/incubator-age
- arkhipov/temporal_tablesgithub.com/arkhipov/temporal_tables
- awslabs/pgbouncer-rr-patchgithub.com/awslabs/pgbouncer-rr-patch
- begriffs/postgrestgithub.com/begriffs/postgrest
- chumaky/docker-imagesgithub.com/chumaky/docker-images
- cloudnative-pg/postgres-containersgithub.com/cloudnative-pg/postgres-containers
- commandprompt/pgmanagegithub.com/commandprompt/pgmanage
- eulerto/wal2jsongithub.com/eulerto/wal2json
- heterodb/pg-stromgithub.com/heterodb/pg-strom
- jackc/pglogreplgithub.com/jackc/pglogrepl
- keithf4/pg_bloat_checkgithub.com/keithf4/pg_bloat_check
- knizhnik/imcsgithub.com/knizhnik/imcs
- MaterializeInc/materializegithub.com/MaterializeInc/materialize
- Mooncake-Labs/pg_mooncakegithub.com/Mooncake-Labs/pg_mooncake
- neondatabase/neongithub.com/neondatabase/neon
- NikolayS/PgQuegithub.com/NikolayS/PgQue
- pgaudit/pgauditgithub.com/pgaudit/pgaudit
- pgq/pgqgithub.com/pgq/pgq
- pllua/plluagithub.com/pllua/pllua
- plv8/plv8github.com/plv8/plv8
- PostgresApp/PostgresAppgithub.com/PostgresApp/PostgresApp
- postgresml/pgcatgithub.com/postgresml/pgcat
- prest/prestgithub.com/prest/prest
- secp256k1-sha256/postgres-compatibility-indexgithub.com/secp256k1-sha256/postgres-compatibility-index
- supabase/supa_auditgithub.com/supabase/supa_audit
- tada/pljavagithub.com/tada/pljava
- tembo-io/pgmqgithub.com/tembo-io/pgmq
- tembo-io/prometheus_fdwgithub.com/tembo-io/prometheus_fdw
- toluaina/pgsyncgithub.com/toluaina/pgsync
- vishesh92/pg-primergithub.com/vishesh92/pg-primer
- Vonng/pigstygithub.com/Vonng/pigsty
- wal-e/wal-egithub.com/wal-e/wal-e
- wal-g/wal-ggithub.com/wal-g/wal-g
- wasmerio/wasmer-postgresgithub.com/wasmerio/wasmer-postgres
- yandex/odysseygithub.com/yandex/odyssey
- zombodb/zombodbgithub.com/zombodb/zombodb
Hacker News6 条
- Hacker News #28425379HN #28425379
- Hacker News #28776786HN #28776786
- Hacker News #30458580HN #30458580
- Hacker News #30462695HN #30462695
- Hacker News #31084147HN #31084147
- Hacker News #32088316HN #32088316
其他外链23 条
- blog.sentry.io/2015/07/23/transaction-id-wraparound-in-postgresblog.sentry.io/2015/07/23/transaction-id-wraparound-in-postgres
- eager.io/blog/audit-postgreseager.io/blog/audit-postgres
- heap.io/blog/how-postgres-audit-tables-saved-us-from-taking-down-productionheap.io/blog/how-postgres-audit-tables-saved-us-from-taking-down-production
- medium.com/p/20d3749ed680medium.com/p/20d3749ed680
- medium.com/paypal-tech/20d3749ed680medium.com/paypal-tech/20d3749ed680
- news.ycombinator.com/threads?id=akorotkovnews.ycombinator.com/threads?id=akorotkov
- pgmodeler.iopgmodeler.io/
- postgres.ispostgres.is/
- postgrespro.com/community/books/internalspostgrespro.com/community/books/internals
- retool.com/blog/how-we-upgraded-postgresql-databaseretool.com/blog/how-we-upgraded-postgresql-database
- slack.engineering/re-architecting-slacks-workspace-preferences-how-to-move-to-an-eav-model-to-support-scalabilityslack.engineering/re-architecting-slacks-workspace-preferences-how-to-move-to-an-eav-model-to-support-scalability
- supabase.com/blog/2022/03/08/auditsupabase.com/blog/2022/03/08/audit
- wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Poolingwiki.postgresql.org/wiki/Replication%2C_Clustering%2C_and_Connection_Pooling
- www.citusdata.com/blog/2017/08/18/introducing-wal-g-faster-restores-for-postgreswww.citusdata.com/blog/2017/08/18/introducing-wal-g-faster-restores-for-postgres
- www.depesz.com/2020/08/25/waiting-for-postgresql-14-improvements-for-handling-large-number-of-connectionswww.depesz.com/2020/08/25/waiting-for-postgresql-14-improvements-for-handling-large-number-of-connections
- www.figma.com/blog/how-figma-scaled-to-multiple-databaseswww.figma.com/blog/how-figma-scaled-to-multiple-databases
- www.interdb.jp/pg/index.htmlwww.interdb.jp/pg/index.html
- www.notion.so/blog/data-model-behind-notionwww.notion.so/blog/data-model-behind-notion
- www.notion.so/blog/sharding-postgres-at-notionwww.notion.so/blog/sharding-postgres-at-notion
- www.percona.com/blog/2009/08/06/why-you-dont-want-to-shardwww.percona.com/blog/2009/08/06/why-you-dont-want-to-shard
- www.raphkoster.com/2009/01/08/database-sharding-came-from-uowww.raphkoster.com/2009/01/08/database-sharding-came-from-uo
- www.slideshare.net/AlexanderKorotkov/solving-postgresql-wicked-problemswww.slideshare.net/AlexanderKorotkov/solving-postgresql-wicked-problems
- yugonagata-pgsql.blogspot.com/2021/06/implementing-incremental-view.html?m=1yugonagata-pgsql.blogspot.com/2021/06/implementing-incremental-view.html?m=1