DataLane

All stacks · Operational data stores

PostgreSQL

The OLTP source of truth: CDC, logical replication, and indexing.

PostgreSQL cover

Related reading

About PostgreSQL

PostgreSQL is the OLTP source of truth in most modern stacks: the system Debezium reads, the app database you must not scan from Trino, and the place indexes and VACUUM still matter.

Data engineers who only know warehouses ship CDC that locks prod and dashboards that take the primary down. Learn logical replication, bloat, and EXPLAIN before you add another connector.

What you'll learn here

  • Logical replication, slots, and CDC without a table lock
  • Indexes, sequential scans, and EXPLAIN (ANALYZE)
  • VACUUM, bloat, and autovacuum tuning as an SLO
  • Partitioning vs “we will warehouse it and forget the app DB”

Frequently asked questions

Is Postgres a warehouse?

Citus, DuckDB extensions, and Foreign Data Wrappers blur the line, but the default Postgres is OLTP. Analytical scans belong on a replica or a warehouse. Using the primary as BI is an outage with extra steps.

How should CDC read Postgres?

Logical decoding (Debezium, native publications), not polling a timestamp column. Monitor slot lag. Snapshot with care — a bad snapshot is a prod incident.

What is the first Postgres skill for DE interviews?

EXPLAIN a slow query, name the index you would add, and say when you would not add one. Then CDC. Window functions are warehouse SQL; this is the source system.

New PostgreSQL posts, straight to your inbox

One email a week with our latest tutorials. No spam.

Newsletter signup is not live yet. Use the contact form if you want to be notified.

↑↓ navigate openesc close