55 articles
Knowledge Base
PostgreSQL
55 articles in the PostgreSQL category · page 2 of 3.
- Installing PostgreSQL on Ubuntu with the PGDG repository Install PostgreSQL 16 on Ubuntu from the PGDG repo, verify the cluster, set up authentication, and prepare the host for day-2 operations.
- Deploying a CockroachDB 24.x 3-node cluster on Ubuntu 22.04 with TLS Stand up a self-hosted CockroachDB 24.x cluster on three Ubuntu 22.04 VMs — node certificates, internal-only listener, snapshot strategy aligned with cloud volumes.
- PostgreSQL logical replication in depth Operate PostgreSQL logical replication beyond the basics — publication filters, conflict handling, replication slots, and the failure modes you only see in production.
- Citus sharding for PostgreSQL in depth Operate Citus distributed PostgreSQL — coordinator/worker layout, distribution columns, reference tables, colocated joins, and rebalance operations.
- Row-level security for multi-tenant PostgreSQL Enforce tenant isolation in PostgreSQL with row-level security — policies, FORCE RLS, session variables, performance considerations, and bypass roles.
- pgAudit for row-level auditing on PostgreSQL Use the pgAudit extension to log who did what to PostgreSQL — session and object audit, row-level filters, performance trade-offs, and downstream pipelines.
- TimescaleDB continuous aggregates: designing rollups for fast dashboards Designing a continuous-aggregates hierarchy in TimescaleDB so dashboards stay sub-second as your hypertable crosses a billion rows — bucket sizes, refresh policies, real-time aggregates, hierarchical rollups.
- JSONB indexing with GIN and JSONPath on PostgreSQL Index JSONB columns in PostgreSQL — pick between jsonb_ops and jsonb_path_ops, use expression indexes, and use JSONPath for surgical queries.
- VACUUM strategies for very large PostgreSQL tables Tune autovacuum for large PostgreSQL tables — per-table thresholds, parallel workers, freeze management, and the patterns that prevent transaction-ID wraparound.
- pgvector similarity search on PostgreSQL Run vector similarity search in PostgreSQL with pgvector — HNSW vs IVFFlat, dimensionality, indexing trade-offs, and operational sizing for RAG workloads.
- PostgreSQL streaming replication — setup and verification Configure asynchronous streaming replication, bootstrap a standby with pg_basebackup, monitor lag, and prepare for a clean promotion path.
- pgBadger log analysis for PostgreSQL Configure PostgreSQL logging and run pgBadger to produce HTML reports on slow queries, lock waits, errors, and traffic patterns — daily ops cadence.
- PostgreSQL roles and pg_hba.conf — authentication done right How PostgreSQL roles, group membership, and pg_hba.conf interact — with the rule order, the TLS-required pattern, and the audit query for drift detection.
- Deploying PostgreSQL 16 HA with Patroni + etcd + HAProxy on AlmaLinux 9 Stand up a self-hosted Postgres 16 HA cluster on AlmaLinux 9 — Patroni for orchestration, etcd for consensus, HAProxy for routing, pgBouncer in front.
- pg_dump and pg_restore — logical backups for PostgreSQL Produce parallel custom-format dumps with pg_dump, restore selectively with pg_restore, and use directory format for the fastest restores at scale.
- pg_repack for online table and index rebuilds on PostgreSQL Use pg_repack to reclaim bloat without long ACCESS EXCLUSIVE locks — install, plan a run, monitor progress, and handle the edge cases that trip up first-timers.
- PgBouncer transaction-pool mode for PostgreSQL Run PgBouncer in transaction-pool mode for PostgreSQL — pool sizing, prepared-statement workarounds since PG 14, server-side feature restrictions, and monitoring.
- PostgreSQL declarative partitioning for large tables Design RANGE, LIST, and HASH partitioning on PostgreSQL 14+ with constraint exclusion, partition pruning, and maintenance workflows that hold at scale.
- PostgreSQL GiST and GIN indexes — when to pick which Choose between GiST and GIN indexes for full-text, JSONB, trigram, geometry, and array workloads — build cost, query speed, and operational care.
- PostgreSQL Foreign Data Wrappers in production Use postgres_fdw and friends to query external systems from PostgreSQL — connection management, predicate pushdown, transaction semantics, and where FDWs fall over.
- Deploying a YugabyteDB 2.x 3-node cluster (Postgres-compatible distributed SQL) Stand up a self-hosted YugabyteDB 2.x cluster on three Ubuntu 22.04 VMs — yb-master, yb-tserver, YSQL on 5433, YCQL on 9042 — with replication factor 3 and snapshot strategy.
- wal2json CDC pipelines from PostgreSQL Run change data capture from PostgreSQL using the wal2json logical decoding plugin — output format, replication slots, consumer choices, and operational care.
- pg_stat_statements for PostgreSQL query tuning Use pg_stat_statements to find slow queries, regressions, and write-heavy hot paths in PostgreSQL — install, key queries, and the reset cadence we run.
- BRIN indexes for very large PostgreSQL tables Use BRIN indexes on append-only PostgreSQL tables — when they outperform btree, how to size pages_per_range, summarisation, and the access patterns BRIN cannot help.