Nikolay talks to Michael about Postgres AI's new monitoring tool — what it is, how its different to other tools, and some of the thinking behind it. Here are some links to things they mentioned: postgres_ai monitoring https://gitlab.com/postgres-ai/postgres_ai DB Lab 4.0 announcement https://github.com/postgres-ai/database-lab-engine/releases/tag/v4.0.0 pganalyze https://pganalyze.com postgres-checkup https://gitlab.com/postgres-ai/postgres-checkup Percona Monitoring and Management (PMM) https:/...
Jul 25, 2025•45 min•Ep. 152
Nikolay and Michael are joined by Andrew Johnson and Nate Brennand from Metronome to discuss MultiXact member space exhaustion — what it is, how they managed to hit it, and some tips to prevent running into it at scale. Here are some links to things they mentioned: Nate Brennand https://postgres.fm/people/nate-brennand Andrew Johnson https://postgres.fm/people/andrew-johnson Metronome https://metronome.com Root Cause Analysis: PostgreSQL MultiXact member exhaustion incidents (blog post by Metron...
Jul 18, 2025•56 min•Ep. 151
Nikolay and Michael are joined by Sugu Sougoumarane to discuss Multigres — a project he's joined Supabase to lead, building an adaptation of Vitess for Postgres! Here are some links to things they mentioned: Sugu Sougoumarane https://postgres.fm/people/sugu-sougoumarane Supabase https://supabase.com Announcing Multigres https://supabase.com/blog/multigres-vitess-for-postgres Vitess https://github.com/vitessio/vitess SPQR https://github.com/pg-sharding/spqr Citus https://github.com/citusdata/citu...
Jul 11, 2025•1 hr 19 min•Ep. 150
Nikolay and Michael are joined by Gwen Shapira to discuss multi-tenant architectures — the high level options, the pros and cons of each, and how they're trying to help with Nile. Here are some links to things they mentioned: Gwen Shapira https://postgres.fm/people/gwen-shapira Nile https://www.thenile.dev SaaS Tenant Isolation Strategies (AWS whitepaper) https://docs.aws.amazon.com/whitepapers/latest/saas-tenant-isolation-strategies/saas-tenant-isolation-strategies.html Row Level Security https...
Jun 20, 2025•50 min•Ep. 149
Nikolay and Michael discuss looking at queries by mean time — when it makes sense, why ordering by a percentile (like p99) might be better, and the merits of approximating percentiles in pg_stat_statements using the standard deviation column. Here are some links to things they mentioned: Approximate the p99 of a query with pg_stat_statements (blog post by Michael) https://www.pgmustard.com/blog/approximate-the-p99-of-a-query-with-pgstatstatements pg_stat_statements https://www.postgresql.org/doc...
Jun 13, 2025•39 min•Ep. 148
Nikolay and Michael discuss logging in Postgres — mostly what to log, and why changing quite a few settings can pay off big time in the long term. Here are some links to things they mentioned: What to log https://www.postgresql.org/docs/current/runtime-config-logging.html#RUNTIME-CONFIG-LOGGING-WHAT Our episode about Auditing https://postgres.fm/episodes/auditing Our episode on auto_explain https://postgres.fm/episodes/auto_explain Here are the parameters they mentioned changing: log_checkpoints...
Jun 06, 2025•49 min•Ep. 147
Nikolay and Michael discuss moving off managed services — when and why you might want to, and some tips on how for very large databases. Here are some links to things they mentioned: Patroni https://github.com/patroni/patroni pgBackRest https://github.com/pgbackrest/pgbackrest WAL-G https://github.com/wal-g/wal-g Hetzner Cloud https://www.hetzner.com/cloud Postgres Extensions Day https://pgext.day pg_wait_sampling https://github.com/postgrespro/pg_wait_sampling pg_stat_kcache https://github.com/...
May 30, 2025•48 min•Ep. 146
Nikolay and Michael discuss heavyweight locks in Postgres — how to think about them, why you can't avoid them, and some tips for minimising issues. Here are some links to things they mentioned: Locking (docs) https://www.postgresql.org/docs/current/explicit-locking.html Postgres rocks, except when it blocks (blog post by Marco Slot) https://www.citusdata.com/blog/2018/02/15/when-postgresql-blocks/ Lock Conflicts (tool by Hussein Nasser) https://pglocks.org/ log_lock_waits (docs) https://www.post...
May 23, 2025•39 min•Ep. 145
Nikolay and Michael discuss ten dangerous Postgres related issues — ones that might be painful enough to get onto the CTO and even CEOs desk, and then what you can do proactively. The ten issues discussed are: Heavy lock contention Bloat control and index maintenance Lightweight lock contention Transaction ID wraparound 4-byte integer PKs hitting the limit Replication limits Hard limits Data loss Poor HA choice (split brain) Corruption of various kinds Some previous episodes they mentioned that ...
May 09, 2025•46 min•Ep. 144
Nikolay and Michael discuss synchronous_commit — what it means on single node setups, for synchronous replication setups, and the pros and cons of the different options for each. Here are some links to things they mentioned: synchronous_commit https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT synchronous_commit history on pgPedia https://pgpedia.info/s/synchronous_commit.html Patroni’s maximum_lag_on_failover setting https://patroni.readthedocs.io/en/master/r...
May 02, 2025•51 min•Ep. 143
Nikolay and Michael discuss managed service support — some tips on how to handle cases that aren't going well, tips for requesting features, whether to factor in support when choosing service provider, and whether to use one at all. Here are some links to things they mentioned: YugabyteDB’s new upgrade framework https://www.yugabyte.com/blog/postgresql-upgrade-framework Episode on Blue-green deployments https://postgres.fm/episodes/blue-green-deployments pg_createsubscriber https://www.postgresq...
Apr 25, 2025•36 min•Ep. 142
Nikolay and Michael discuss time-series considerations for Postgres — including when it matters, some tips for avoiding issues, performance considerations, and more. Here are some links to things they mentioned: Time series data https://en.wikipedia.org/wiki/Time_series TimescaleDB https://github.com/timescale/timescaledb 13 Tips to Improve PostgreSQL Insert Performance https://www.timescale.com/blog/13-tips-to-improve-postgresql-insert-performance Why we're leaving the cloud (37 Signals / Basec...
Apr 11, 2025•43 min•Ep. 141
Nikolay and Michael are joined by Tomas Vondra to discuss single query performance cliffs — what they are, why they happen, some things we can do to make them less likely or less severe, and some potential improvements to Postgres that could help. Here are some links to things they mentioned: Tomas Vondra https://postgres.fm/people/tomas-vondra Where do performance cliffs come from? (Talk by Tomas) https://www.youtube.com/watch?v=UzdAelm-QSY Where do performance cliffs come from? (Slides) https:...
Apr 04, 2025•38 min•Ep. 140
Nikolay and Michael are joined by Lev Kokotov to discuss PgDog — including whether or when sharding is needed, the origin story (via PgCat), what's already supported, and what's coming next. Here are some links to things they mentioned: Lev Kokotov https://postgres.fm/people/lev-kokotov PgDog https://github.com/pgdogdev/pgdog PgCat https://github.com/postgresml/pgcat Adopting PgCat (Instacart blog post) https://www.instacart.com/company/how-its-made/adopting-pgcat-a-nextgen-postgres-proxy PgDog ...
Mar 28, 2025•49 min•Ep. 139
Nikolay talks Michael through using cloud snapshots — how they can be used to reduce RTO for huge Postgres setups, also to improve provisioning time, and some major catches to be aware of. Here are some links to things they mentioned: Snapshots on RDS https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_CreateSnapshot.html pgBackRest https://pgbackrest.org WAL-G https://github.com/wal-g/wal-g pg_backup_start and pg_backup_stop (docs) https://www.postgresql.org/docs/current/functions-admin...
Mar 21, 2025•44 min•Ep. 138
Nikolay and Michael discuss GIN indexes in Postgres — what they are, what they're used for, and some limitations to be aware of. Here are some links to things they mentioned: GIN Indexes https://www.postgresql.org/docs/current/gin.html Generalized Search Trees for Database Systems (Hellerstein, Naughton, Pfeffer) https://dsf.berkeley.edu/papers/vldb95-gist.pdf RUM extension https://pgxn.org/dist/rum/1.1.0/ Understanding Postgres GIN Indexes: The Good and the Bad (Lukas Fittl) https://pganalyze.c...
Mar 14, 2025•41 min•Ep. 137
Nikolay and Michael use a recent "best practices" article as a prompt — giving a few tips each on the topics mentioned, like schema design, performance, backups, and more. Here are some links to things they mentioned: 7 Crucial PostgreSQL Best Practices (recent blog post) https://speakdatascience.com/postgresql-best-practices “Don't do this” episode https://postgres.fm/episodes/dont-do-this Article discussion on Hacker News https://news.ycombinator.com/item?id=42992913 Mozilla’s SQL Style Guide ...
Mar 07, 2025•41 min•Ep. 136
Nikolay and Michael discuss the CREATE STATISTICS feature in Postgres — what it's for, how often it's used, and how to spot cases where it would help. Here are some links to things they mentioned: CREATE STATISTICS https://www.postgresql.org/docs/current/sql-createstatistics.html citext https://www.postgresql.org/docs/current/citext.html Statistics Used by the Planner https://www.postgresql.org/docs/current/planner-stats.html default_statistics_target https://www.postgresql.org/docs/current/runt...
Feb 28, 2025•33 min•Ep. 135
Nikolay and Michael are joined by Franck Pachot to discuss SQL vs NoSQL — did Franck change teams by joining MongoDB, normalisation vs denormalisation, developer experience, NULLs, and more! Here are some links to things they mentioned: Franck Pachot https://postgres.fm/people/franck-pachot Franck's workshop at PGConf India https://pgconf.in/conferences/pgconfin2025/program/proposals/958 PostgreSQL Conference Germany https://2025.pgconf.de "Schema Later" Considered Harmful by Michael Stonebraker...
Feb 14, 2025•50 min•Ep. 134
Nikolay and Michael return to the topic of BUFFERS for the third (and final?) time! They discuss the news that it'll be on by default with EXPLAIN ANALYZE in Postgres 18, and what effect that might have. Here are some links to things they mentioned: Our first BUFFERS episode https://postgres.fm/episodes/buffers-by-default Our second BUFFERS episode https://postgres.fm/episodes/buffers-ii-the-sequel BUFFERS enabled for EXPLAIN ANALYZE by default (commit for Postgres 18) https://git.postgresql.org...
Feb 07, 2025•52 min•Ep. 133
Nikolay and Michael discuss a couple of surprising ways read queries (selects) can cause writes (shared buffers dirtied) in Postgres. Here are some links to things they mentioned: Reads causing writes in Postgres (post by Alex Jesipow) https://jesipow.com/blog/postgres-reads-cause-writes/ Exploring how SELECT queries can produce disk writes (post by Nikolay Sivko) https://blog.okmeter.io/postgresql-exploring-how-select-queries-can-produce-disk-writes-f36c8bee6b6f Hint Bits (wiki) https://wiki.po...
Jan 24, 2025•27 min•Ep. 132
Nikolay and Michael discuss adding constraints in an online fashion, using NOT VALID and then VALIDATE CONSTRAINT. Here are some links to things they mentioned: ADD table_constraint NOT VALID https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-ADD-TABLE-CONSTRAINT Our episode on zero-downtime migrations https://postgres.fm/episodes/zero-downtime-migrations VALIDATE CONSTRAINT https://www.postgresql.org/docs/current/sql-altertable.html#SQL-ALTERTABLE-DESC-VALIDATE-CONS...
Jan 17, 2025•34 min•Ep. 131
Michael and Nikolay are joined by Antonín Houska to discuss pg_squeeze — what it is, how it started, some of its features, and hopes of getting the functionality into core. Here are some links to things they mentioned: Antonín Houska https://postgres.fm/people/antonin-houska pg_squeeze https://github.com/cybertec-postgresql/pg_squeeze Cybertec https://www.cybertec-postgresql.com pg_repack https://github.com/reorg/pg_repack Introducing pg_squeeze (by Kaarel Moppel) https://www.cybertec-postgresql...
Jan 10, 2025•36 min•Ep. 130
Michael and Nikolay are joined by Joe Sciarrino and Jelte Fennema-Nio to discuss pg_duckdb — what it is, how it started, what early users are using it for, and what they're working on next. Here are some links to things they mentioned: Joe Sciarrino https://postgres.fm/people/joe-sciarrino Jelte Fennema-Nio https://postgres.fm/people/jelte-fennema-nio pg_duckdb https://github.com/duckdb/pg_duckdb Hydra https://www.hydra.so MotherDuck https://motherduck.com The problems and benefits of an elephan...
Jan 03, 2025•40 min•Ep. 129
Nikolay and Michael discuss Row Level Security in Postgres, focussing on the performance side effects and some tips to avoid (or minimize) them. Here are some links to things they mentioned: Row Security Policies (docs) https://www.postgresql.org/docs/current/ddl-rowsecurity.html 7+ million Postgres tables (recent talk by Kailash Nadh) https://www.youtube.com/watch?v=xhi5Q_wL9i0 Row Level Security guide (Supabase docs) https://supabase.com/docs/guides/database/postgres/row-level-security current...
Dec 20, 2024•41 min•Ep. 128
Michael and Nikolay are joined by Lukas Eder, the creator of jOOQ, to discuss what it is, some nice developer experience features it has, and some fun things he's come across from a Postgres perspective. Here are some links to things they mentioned: Lukas Eder https://postgres.fm/people/lukas-eder jOOQ https://www.jooq.org/ DSL https://en.wikipedia.org/wiki/Domain-specific_language SQL Dialects https://www.jooq.org/javadoc/latest/org.jooq/org/jooq/SQLDialect.html MERGE https://www.postgresql.org...
Dec 13, 2024•51 min•Ep. 127
Nikolay and Michael discuss "Column Tetris" — what it is, why it matters, how to order columns for new tables, and how to re-organise existing ones. Here are some links to things they mentioned: “Column Tetris” by Erwin Brandstetter on Stack Overflow https://stackoverflow.com/questions/2966524/calculating-and-saving-space-in-postgresql/7431468#7431468 Data Types https://www.postgresql.org/docs/current/datatype.html OrioleDB beta7 benchmarks https://www.orioledb.com/blog/orioledb-beta7-benchmarks...
Dec 06, 2024•41 min•Ep. 126
Nikolay and Michael discuss the track_planning parameter of pg_stat_statements — what it is, how it affects performance, and when or whether you should switch it on. Here are some links to things they mentioned: pg_stat_statements.track_planning https://www.postgresql.org/docs/current/pgstatstatements.html#id-1.11.7.40.9.2.4.1.3 Our episode about pg_stat_statements https://postgres.fm/episodes/pg_stat_statements PostgreSQL 13.0 release notes https://www.postgresql.org/docs/release/13.0/ track_pl...
Nov 29, 2024•38 min•Ep. 125
Michael and Nikolay are joined by Gülçin Yıldırım Jelínek and Robert Haas to discuss both the technical question of whether or not pg_dump is a backup tool, as well as the tone and intent behind the statement "pg_dump is not a backup tool". Here are some links to things they mentioned: Gülçin Yıldırım Jelínek https://postgres.fm/people/gulcin-yildirim-jelinek Robert Haas https://postgres.fm/people/robert-haas Why you should upgrade PostgreSQL today (blog post by Gülçin) https://xata.io/blog/cve-...
Nov 22, 2024•49 min•Ep. 124
Nikolay and Michael discuss append-only tables in Postgres — what they are, some unique challenges they bring, and some options for compressing / removing / offloading the data eventually. Here are some links to things they mentioned: Append-only https://en.wikipedia.org/wiki/Append-only Our episode on BRIN indexes https://postgres.fm/episodes/brin-indexes Tips to Improve Insert Performance https://www.timescale.com/blog/13-tips-to-improve-postgresql-insert-performance/ Our episode on WAL and ch...
Nov 15, 2024•44 min•Ep. 123