· 17 min
PostgreSQL: One Match, Three IDs, No Duplicate Fixtures
When sports feeds assign different IDs to one fixture, canonical match records, provider mappings, and guarded updates prevent duplicate data.
- #postgres
- #data-modeling
- #data-quality
All stacks · Operational data stores
The OLTP source of truth: CDC, logical replication, and indexing.
· 17 min
When sports feeds assign different IDs to one fixture, canonical match records, provider mappings, and guarded updates prevent duplicate data.
· 6 min
A BI scan froze autovacuum, the replication slot kept WAL, and the disk hit 91%. Read the plan, manage bloat, and keep CDC from filling the volume.
· 5 min
Trino stores nothing. A federated SELECT * on prod Postgres is a database incident. Use Iceberg for the lake, and keep interactive SQL off OLTP.
· 6 min
Processing time lies after a restart and watermarks drop late events on purpose. Checkpoints recover, savepoints migrate, Kafka EOS does not upsert Postgres.
· 14 min
Postgres CDC with Debezium in production: how the replication slot fills your disk, snapshotting a large table without locks, and replay-safe change apply.
· 12 min
What happens to a CTE in Postgres, Snowflake, and BigQuery, when it blocks predicate pushdown, and when referencing it twice costs you two scans.
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.
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.
Logical decoding (Debezium, native publications), not polling a timestamp column. Monitor slot lag. Snapshot with care — a bad snapshot is a prod incident.
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.