PostgreSQL
#関係データベース #ミドルウェア #RDBMS
インストール (Ubuntu)
UbuntuでPostgreSQLを使ってみよう (2)
Docker
コンテナの起動例
code:shell
$ docker run --name postgres -e POSTGRES_USER=test -e POSTGRES_PASSWORD=test -e POSTGRES_DB=test -d -p 5432:5432 postgres
$ docker exec -it postgres psql -U test
関連コマンド
createdb
psql
Linter
squawk
sqlfluff
splinter
データベースマイグレーション
pgroll - Zero-downtime, reversible, schema migrations for Postgres
ホスティング/マネージドサービス
Neon
Supabase
Prisma Postgres
拡張
TimescaleDB
pg_duckdb - DuckDB-powered Postgres for high performance apps & analytics.
PGMQ
embedded PostgreSQL
zonkyio/embedded-postgres-binaries - Lightweight bundles of PostgreSQL binaries with reduced size intended for testing purposes.
fergusstrange/embedded-postgres - Run a real Postgres database locally on Linux, OSX or Windows as part of another Go application or test
- Lightweight Postgres packaged as WASM into a TypeScript library for the browser, Node.js, Bun and Deno
Connection poolers
Background jobs
River - River is a robust high-performance job processing system for Go and Postgres.
pg-boss - Queueing jobs in Postgres from Node.js like a boss
graphile-worker - High performance Node.js/PostgreSQL job queue (also suitable for getting jobs generated by PostgreSQL triggers/functions out into a different work queue)
ソース
PostgreSQLのソースコードの構造
プロトコル
トランザクション
PostgreSQL Subtransactions Considered Harmful
Vacuum
PostgreSQLのvacuumについて調べたメモ
行レベルセキュリティ
PostgreSQL Row Level Security (RLS) を使って顧客データ保護の安全性を高めている件 - Techouse Developers Blog
アドバイザリロック
排他制御のためだけに Redis 渋々使ってませんか?データベース単独でアドバイザリーロックできるよ!
関数
Trigger Procedures
システム列
テーブル設計
Sharding & IDs at Instagram
JSON/JSONB
【PostgreSQL】いかにして JSONB を安全に扱うか
supabase/pg_jsonschema - PostgreSQL extension providing JSON Schema validation
gavinwahl/postgres-json-schema - JSON Schema validation for PostgreSQL
参考
awesome-postgres
Database guides | GitLab
PostgreSQLの仕組みから学ぶために必要な資料 - そーだいなるらくがき帳
Do You Really Need Redis? How to Get Away with Just PostgreSQL
Lesser Known PostgreSQL Features
Postgres as a search engine - tsvector/pgvector/pg_trgmなどについて
What Really Happens When You Drop a Column in Postgres