Resumo do episódio
Michael, Nik, and Kirk discuss Postgres 19: why the release came in November and not in September, the features we like most, and what to check before you upgrade.
Michael, Nik, and Kirk discuss Postgres 19: why the release came in November and not in September, the features we like most, and what to check before you upgrade.
Episódios
Postgres 19
OuvidoMichael, Nik, and Kirk discuss Postgres 19: why the release came in November and not in September, the features we like most, and what to check before you upgrade.
The hidden costs of CREATE TEMP TABLE
OuvidoNik and Kirk discuss the hidden costs of CREATE TEMP TABLE: dead tuples and catalog bloat, and the shared invalidation queue that every session has to read. They cover why thousands of idle sessions make it much worse, what it looks like in wait events, and what to use instead.
Extensions on demand
OuvidoNik and Kirk are joined by Álvaro Hernández to discuss how Postgres in containers gets its extensions: a fat image with all of them, extensions downloaded at run time, or StackGres Containers, built on DOCIR (Dynamic OCI Registry), which composes an image with only the extensions you ask for, on demand. They also discuss what this means for security, pinning versions, and major upgrades.
UUIDv4 vs UUIDv7
OuvidoNik is joined by Kirk Wolak to discuss what a random UUIDv4 primary key really costs compared with a time-ordered UUIDv7 or an int8 key on Postgres 18 — index size, WAL and full-page writes, insert rate once the index outgrows memory — and what DBLab Forge found when it ran the experiment.
Dump/restore done. Now what?
OuvidoNik is joined by Kirk Wolak, Software Architect at KiraSoft, to discuss what a database still needs after pg_restore finishes and before it takes production traffic — what pg_dump and pg_restore leave behind, why autovacuum may not catch up in time, and how Postgres itself could do better.
Citus + StackGres
OuvidoNik and Michael are joined by Álvaro Hernández to discuss sharding Postgres with Citus and StackGres, especially the new query router support that has been added very recently. Here are some links to things they mentioned: Álvaro Hernández https://postgres.fm/people/alvaro-hernandez-tortosa Ongres https://ongres.com Scaling Citus without limits: announcing Query Routers in StackGres https://stackgres.io/blog/scaling-citus-beyond-one-coordinator-announcing-query-routers-stackgres/ Open-source Citus matches PlanetScale's Neki at 10M QPS on half the data nodes https://stackgres.io/blog/open-source-citus-matches-planetscales-neki-at-10m-qps-on-half-the-data-nodes/ Postgres TV discussion about licenses with Álvaro https://www.youtube.com/watch?v=1rcbyIjA4gI Our episode with Sugu from Multigres https://postgres.fm/episodes/multigres Our (first) episode with Lev from PgDog https://postgres.fm/episodes/pgdog Citus https://github.com/citusdata/citus Citus goes fully open source (2022)…
GSoC B-Tree Merge
OuvidoNik and Michael are joined by Salma El-Sayed and Kirk Wolak to discuss their in-progress and very ambitious Google Summer of Code project around adding Btree Merge support to Postgres. Here are some links to things they mentioned: Salma El-Sayed https://postgres.fm/people/salma-el-sayed Kirk Wolak https://postgres.fm/people/kirk-wolak Google Summer of Code https://summerofcode.withgoogle.com PostgreSQL GSoC 2026 project ideas https://wiki.postgresql.org/wiki/GSoC_2026 CMU Intro to Database Systems https://www.youtube.com/playlist?list=PLSE8ODhjZXjYMAgsGH-GtY5rJYZ6zjsd5 Kirk, NIK, and Andrey’s Hacking Postgres sessions on YouTube https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRz B-tree Index Bloat Reduction - Approach & Questions (Hackers thread, with patches) https://www.postgresql.org/message-id/flat/CANBEAPFq3YAOydjUS3xwcUG9L6e3WE5Z4nGPk_Q3RsjSFWTJNA%40mail.gmail.com B-tree merge visualizer https://kirkw.github.io/explainers/btree-merge-explainer.html ~~~ What did you like or not…
ClickHouse Managed Postgres
OuvidoNik and Michael are joined by Sai Srirampur to discuss ClickHouse's new managed Postgres service. Here are some links to things they mentioned: Sai Srirampur https://postgres.fm/people/sai-srirampur ClickHouse Managed Postgres https://clickhouse.com/cloud/postgres ClickPipes https://clickhouse.com/cloud/clickpipes walshadow https://github.com/ClickHouse/walshadow pg_clickhouse https://github.com/clickHouse/pg_clickhouse ClickHouse PostgreSQL powered by Ubicloud https://www.ubicloud.com/blog/clickhouse-postgresql-powered-by-ubicloud Hacking Postgres logical decoding sessions https://hacking.postgres.tv/topics/logical-decoding/ wal-rus https://github.com/ClickHouse/wal-rus pg_createsubscriber https://www.postgresql.org/docs/current/app-pgcreatesubscriber.html ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov,…
hot_standby_feedback
OuvidoNik and Michael discuss hot_standby_feedback — what it controls, whether and when read replicas should be changed to on, and other settings you can change to help too. Here are some links to things they mentioned: hot_standby_feedback https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-HOT-STANDBY-FEEDBACK hot_standby_feedback: experiments on PostgreSQL 17 (by Nik) https://console.postgres.ai/shared/brief/6018f69d-8975-48e3-8259-a72c77105572 Best practices for Amazon RDS PostgreSQL replication (blog post) https://aws.amazon.com/blogs/database/best-practices-for-amazon-rds-postgresql-replication/ log_autovacuum_min_duration https://www.postgresql.org/docs/current/runtime-config-logging.html#GUC-LOG-AUTOVACUUM-MIN-DURATION max_standby_streaming_delay https://www.postgresql.org/docs/current/runtime-config-replication.html#GUC-MAX-STANDBY-STREAMING-DELAY WAIT FOR LSN https://www.postgresql.org/docs/19/sql-wait-for.html transaction_timeout…
Estimating work_mem
OuvidoNik and Michael are joined by Shaun Thomas to discuss estimating work_mem, memory management in general, and writing an extension to help. Here are some links to things they mentioned: Shaun Thomas https://postgres.fm/people/shaun-thomas work_mem https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-WORK-MEM pg_stat_database https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-DATABASE-VIEW ALTER ROLE SET configuration_parameter https://www.postgresql.org/docs/current/sql-alterrole.html#SQL-ALTERROLE-PARAMS-CONFIGURATION-PARAMETER hash_mem_multiplier https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-HASH-MEM-MULTIPLIER Recent Postgres releases with 28 CVEs fixed https://www.postgresql.org/about/news/postgresql-186-1711-1615-1519-1424-and-19-beta-3-released-3365/ Systemic Risks in the Managed PostgreSQL Industry (part 1 of 6, Mehmet Ince)…
pgrust
OuvidoNik and Michael are joined by Michael Malis, co-creator of pgrust, to discuss their Postgres rewrite, including reliability problems, compatibility testing, faster analytics, and a new JIT-compiled query engine. Here are some links to things they mentioned: Michael Malis https://postgres.fm/people/michael-malis pgrust https://github.com/malisper/pgrust The four horsemen behind Postgres outages (blog post by Michael Malis) https://malisper.me/the-four-horsemen-behind-thousands-of-postgres-outages Rebuilding Postgres for faster analytics: batching, operator fusion, and SIMD (blog post by Michael Malis) https://malisper.me/how-we-made-postgres-hundreds-of-times-faster-the-query-engine/ kani https://github.com/model-checking/kani Antithesis https://antithesis.com fsyncgate mailing list thread https://www.postgresql.org/message-id/flat/CAMsr%2BYHh%2B5Oq4xziwwoEfhoTZgr07vdGG%2Bhu%3D1adXx59aTeaoQ%40mail.gmail.com How AI Changes the Economics of JIT Compilers (blog post by Michael Malis)…
MVCC
OuvidoNik and Michael are joined by Radim Marek to discuss MVCC, including his recent article on how Postgres chose to implement it compared to other systems. Here are some links to things they mentioned: Radim Marek https://postgres.fm/people/radim-marek BoringSQL https://boringsql.com PostgreSQL's MVCC is bad. So is everyone else's (blog post by Radim) https://boringsql.com/posts/mvcc-bad-bad/ PostgreSQL MVCC documentation https://www.postgresql.org/docs/current/mvcc-intro.html PostgreSQL Storage Internals series by Radim https://boringsql.com/guides/postgresql-storage-internals/ PgQue https://github.com/NikolayS/pgque The next ten years of Postgres (talk slides by Álvaro Herrera) https://www.postgresql.eu/events/pgconfde2026/sessions/session/7744/slides/866/edb-keynote-pgconfde-2026.pdf Episode on RegreSQL https://postgres.fm/episodes/regresql DryRun MCP https://github.com/boringsql/dryrun ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or…
Xata
OuvidoNik and Michael are joined by Tudor Golubenco, CTO of Xata, to discuss their architecture, progress, and open source tooling. Here are some links to things they mentioned: Tudor Golubenco https://postgres.fm/people/tudor-golubenco Xata https://xata.io Xata is now open source https://xata.io/blog/xata-is-now-open-source DBLab Engine https://postgres.ai/docs/database-lab pgstream https://github.com/xataio/pgstream Xata acquires Privacy Dynamics for advanced anonymization https://xata.io/blog/xata-acquires-privacy-dynamics Tonic AI https://www.tonic.ai A thousand Postgres branches for one dollar https://xata.io/blog/a-thousand-postgres-branches-for-1 pgroll https://github.com/xataio/pgroll CloudNativePG https://github.com/cloudnative-pg/cloudnative-pg PGSimCity https://nikolays.github.io/PGSimCity DeltaX https://github.com/xataio/deltax ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is…
DBOS
OuvidoNik and Michael are joined by Qian Li and Peter Kraft to talk about DBOS, an open source platform for durable workflows built on Postgres. Here are some links to things they mentioned: Qian Li https://postgres.fm/people/qian-li Peter Kraft https://postgres.fm/people/peter-kraft DBOS https://www.dbos.dev Temporal https://temporal.io Gadget's use of Postgres https://postgres.fm/episodes/gadgets-use-of-postgres Postgres LISTEN/NOTIFY blog post from Recall AI https://www.recall.ai/blog/postgres-listen-notify-does-not-scale Postgres 19 commit that improves LISTEN/NOTIFY, avoiding waking backends that have no need to process the notification messages https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=282b1cde9 PgQue https://github.com/NikolayS/pgque pg_durable https://github.com/microsoft/pg_durable Absurd https://github.com/earendil-works/absurd LISTEN/NOTIFY performance considerations (docs patch submitted by Nik)…
pg_stat_log
OuvidoNik and Michael are joined by Fabrízio Mello to discuss his new extension pg_stat_log. Here are some links to things they mentioned: Fabrízio Mello https://postgres.fm/people/fabrizio-de-royes-mello Timbira https://www.timbira.com.br PlanetScale https://planetscale.com pg_stat_log https://github.com/fabriziomello/pg_stat_log Custom Cumulative Statistics (docs) https://www.postgresql.org/docs/current/xfunc-c.html#XFUNC-ADDIN-CUSTOM-CUMULATIVE-STATISTICS Custom Cumulative Statistics (wiki page) https://wiki.postgresql.org/wiki/CustomCumulativeStats logerrors https://github.com/munakoiso/logerrors pgFouine https://www.postgresql.org/ftp/projects/pgFoundry/pgfouine/pgFouine pgBadger https://github.com/darold/pgbadger pg_stat_checkpointer https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-CHECKPOINTER-VIEW pg_wait_sampling https://github.com/postgrespro/pg_wait_sampling RFC: pg_stat_logmsg (patch proposal by Joe Conway)…
pgBackRest
OuvidoNik and Michael are joined by David Steele to talk all things pgBackRest. Here are some links to things they mentioned: David Steele https://postgres.fm/people/david-steele pgBackRest https://pgbackrest.org pg_basebackup https://www.postgresql.org/docs/current/app-pgbasebackup.html Barman https://pgbarman.org pgmoneta https://github.com/pgmoneta/pgmoneta WAL-G https://github.com/wal-g/wal-g Return pg_control from pg_backup_stop (patch proposal) https://www.postgresql.org/message-id/flat/86436ff9-eb98-4c8a-825e-3bcae022107b%40pgbackrest.org#e36e2ad2f410d1a9a1152e36aa66bb48 Add StorageReadMulti for prefetched multi-file/range reads from object stores (pgBackRest change that needs review) https://github.com/pgbackrest/pgbackrest/pull/2783 pg_hardstorage https://github.com/cybertec-postgresql/pg_hardstorage Why the cycle of open-source sustainability needs to be virtuous (blog post by Gabriele Bartolini)…
autovacuum
OuvidoNik and Michael discuss autovacuum, including what it does, and the basics of why and how to tune it. Here are some links to things they mentioned: autovacuum https://www.postgresql.org/docs/current/routine-vacuuming.html#AUTOVACUUM autovacuum configuration parameters https://www.postgresql.org/docs/current/runtime-config-vacuum.html#RUNTIME-CONFIG-AUTOVACUUM What’s Missing in Postgres? (our episode with Bruce Momjian) https://postgres.fm/episodes/what-s-missing-in-postgres pg_squeeze (our episode with Antonín Houska) https://postgres.fm/episodes/pg_squeeze My queries to monitor autovacuum (post by Laurenz Albe) https://www.cybertec-postgresql.com/en/monitor-autovacuum-my-queries/ Autovacuum Tuning Basics (post by Tomas Vondra, originally for 2nd Quadrant blog) https://www.enterprisedb.com/blog/autovacuum-tuning-basics Zero autovacuum_vacuum_cost_delay, Write Storms, and You (post by Jeremy Schneider) https://ardentperf.com/2026/04/12/zero-autovacuum_cost_delay-write-storms-and-you/ Our episode on…
pg_flight_recorder
OuvidoNik and Michael are joined by David Ventimiglia to discuss pg_flight_recorder, a new tool he created for monitoring a Postgres database from within. Here are some links to things they mentioned: David Ventimiglia https://postgres.fm/people/david-ventimiglia pg_flight_recorder https://github.com/dventimisupabase/pg_flight_recorder Supabase https://supabase.com pg_wait_sampling https://github.com/postgrespro/pg_wait_sampling pg_ash https://github.com/NikolayS/pg_ash pg_cron https://github.com/citusdata/pg_cron pg_tle https://github.com/aws/pg_tle ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork
PgQue
OuvidoNik and Michael discuss Nik's new project PgQue, a descendent of Skype's PgQ, for running queue-like workloads in Postgres. Here are some links to things they mentioned: Our first episode on Queues in Postgres https://postgres.fm/episodes/queues-in-postgres PgQue https://github.com/NikolayS/pgque HN discussion https://news.ycombinator.com/item?id=47817349 PgQ https://github.com/pgq/pgq pgmq https://github.com/pgmq/pgmq River https://riverqueue.com Keeping a Postgres queue healthy (blog post by Simeon Griggs / PlanetScale) https://planetscale.com/blog/keeping-a-postgres-queue-healthy Postgres Job Queues & Failure By MVCC (blog post by Brandur) https://brandur.org/postgres-queues My queries to monitor autovacuum (blog post by Laurenz Albe) https://www.cybertec-postgresql.com/en/monitor-autovacuum-my-queries/ SELECT FOR UPDATE considered harmful (blog post by Laurenz Albe) https://www.cybertec-postgresql.com/en/select-for-update-considered-harmful-postgresql/ Christophe Pettus blog post…
pg_wait_tracer
OuvidoNik and Michael are joined by Dmitry Fomin to discuss his new tool pg_wait_tracer, as well as changes that could be made to core to allow wait event tracing with lower overhead, and on managed services. Here are some links to things they mentioned: Dmitry Fomin https://postgres.fm/people/dmitry-fomin pg_wait_tracer https://github.com/DmitryNFomin/pg_wait_tracer pg_wait_sampling https://github.com/postgrespro/pg_wait_sampling pg_10046 https://github.com/DmitryNFomin/pg_10046 Jeremy Schneider reply on LinkedIn https://www.linkedin.com/feed/update/urn:li:activity:7414966981847748608 RDS for PostgreSQL wait event docs https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Tuning.concepts.summary.html Custom wait events for extensions (added in PostgreSQL 17) https://www.postgresql.org/docs/current/xfunc-c.html#XFUNC-ADDIN-WAIT-EVENTS Hacking Postgres with Dmitry, Kirk, and Nik (Part 1) https://www.youtube.com/watch?v=3Gtuc2lnnsE Hacking Postgres with Dmitry, Kirk, and Nik (Part 2)…
Schema design checklist
OuvidoNik and Michael discuss a list of things to check when designing new schema in Postgres. Here are some links to things they mentioned: Use BIGINT in Postgres (blog post by Ryan Lambert) https://blog.rustprooflabs.com/2021/06/postgres-bigint-by-default Postgres 18 and UUIDv7 (blog post by Gwen Shapira) https://www.thenile.dev/blog/uuidv7 How to use UUID (how-to guide by Nik) https://postgres.ai/docs/postgres-howtos/schema-design/data-types/how-to-use-uuid Our episode on constraints https://postgres.fm/episodes/constraints Our episode on NULLs https://postgres.fm/episodes/nulls-the-good-the-bad-the-ugly-and-the-unknown MultiXact member space exhaustion episode (with Metronome) https://postgres.fm/episodes/multixact-member-space-exhaustion Our Column Tetris episode https://postgres.fm/episodes/column-tetris Saving Space Basically for Free (blog post by James Coleman from Braintree) https://medium.com/paypal-tech/postgresql-at-scale-saving-space-basically-for-free-d94483d9ed9a Over-indexing episode…
What’s Missing in Postgres?
OuvidoNik and Michael are joined by Bruce Momjian to discuss his new talk "What’s Missing in Postgres?" Here are some links to things they mentioned: Bruce Momjian https://postgres.fm/people/bruce-momjian EDB https://www.enterprisedb.com What’s Missing in Postgres? (Bruce’s slides) https://momjian.us/main/writings/pgsql/missing.pdf The Wonderful World of WAL (Bruce’s slides) https://momjian.us/main/writings/pgsql/wal.pdf Getting started with benchmarking (our episode with Melanie Plageman) https://postgres.fm/episodes/getting-started-with-benchmarking Myths and Truths about Synchronous Replication in Postgres (talk by Alexander Kukushkin) https://www.youtube.com/watch?v=PFn9qRGzTMc The Future of Postgres Sharding (Bruce’s slides) https://momjian.us/main/writings/pgsql/sharding.pdf MultiXact member space exhaustion https://postgres.fm/episodes/multixact-member-space-exhaustion ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on…
Long-running transactions
OuvidoNik and Michael discuss long-running transactions, including when they're harmless, when they cause issues, and how to mitigate those issues. Here are some links to things they mentioned: transaction_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-TRANSACTION-TIMEOUT Our episode on transaction_timeout https://postgres.fm/episodes/transaction_timeout Our episode on slow queries (which was also our first ever episode!) https://postgres.fm/episodes/slow-queries-and-slow-transactions Our episode on locks https://postgres.fm/episodes/locks lock_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-LOCK-TIMEOUT Transaction Isolation levels https://www.postgresql.org/docs/current/transaction-iso.html pg_current_xact_id_if_assigned() https://pgpedia.info/p/pg_current_xact_id_if_assigned.html Monitor xmin horizon to prevent XID/MultiXID wraparound and high bloat (how-to guide by Nik)…
PostGIS
OuvidoNik and Michael are joined by Regina Obe and Paul Ramsey to discuss PostGIS. Here are some links to things they mentioned: Regina Obe https://postgres.fm/people/regina-obe Paul Ramsey https://postgres.fm/people/paul-ramsey PostGIS https://postgis.net MobilityDB https://github.com/MobilityDB/MobilityDB pgRouting https://github.com/pgRouting/pgrouting Google BigQuery GIS public alpha blog post https://cloud.google.com/blog/products/data-analytics/whats-happening-bigquery-integrated-machine-learning-maps-and-more PostGIS Day 2025 talk recordings https://www.youtube.com/watch?v=wuNO_cW2g-0&list=PLavJpcg8cl1EkQWoCbczsOjFTe-SHg_8m pg_lake https://github.com/Snowflake-Labs/pg_lake GeoParquet https://geoparquet.org ST_DWithin https://postgis.net/docs/ST_DWithin.html Postgres JSONB Columns and TOAST: A Performance Guide https://www.snowflake.com/en/engineering-blog/postgres-jsonb-columns-and-toast FOSS4G https://foss4g.org OpenStreetMap https://www.openstreetmap.org PgDay Boston https://2026.pgdayboston.org SKILL.md…
Plan flips
OuvidoNik and Michael discuss query plan flips in Postgres — what they are, some causes, mitigations, longer term solutions, and the recent outage at Clerk. Here are some links to things they mentioned: Recent postmortem from Clerk https://clerk.com/blog/2026-02-19-system-outage-postmortem The real cost of random I/O (blog post by Tomas Vondra) https://vondra.me/posts/the-real-cost-of-random-io autovacuum_analyze_scale_factor https://www.postgresql.org/docs/current/runtime-config-vacuum.html#GUC-AUTOVACUUM-ANALYZE-SCALE-FACTOR default_statistics_target https://www.postgresql.org/docs/current/runtime-config-query.html#GUC-DEFAULT-STATISTICS-TARGET pg_hint_plan https://github.com/ossc-db/pg_hint_plan Aurora PostgreSQL query plan management https://docs.aws.amazon.comAmazonRDS/latest/AuroraUserGuide/AuroraPostgreSQL.Optimize.Start.html pg_stat_plans https://github.com/pganalyze/pg_stat_plans pg_plan_alternatives https://jnidzwetzki.github.io/2026/03/04/pg-plan-alternatives.html Waiting for Postgres 19: Better Planner…
pg_ash
OuvidoNik and Michael discuss pg_ash — a new tool (not extension!) from Nik that samples and stores wait events from pg_stat_activity. Here are some links to things they mentioned: pg_ash https://github.com/NikolayS/pg_ash pg_wait_sampling https://github.com/postgrespro/pg_wait_sampling Amazon RDS performance insights https://aws.amazon.com/rds/performance-insights Our episode on wait events https://postgres.fm/episodes/wait-events pg-flight-recorder https://github.com/dventimisupabase/pg-flight-recorder pg_profile https://github.com/zubkov-andrei/pg_profile pg_cron https://github.com/citusdata/pg_cron ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork
Comments and metadata
OuvidoNik and Michael discuss query level comments, object level comments, and another way of adding object level metadata. Here are some links to things they mentioned: Object comments https://www.postgresql.org/docs/current/sql-comment.html Query comment syntax (from an old version of the docs) https://www.postgresql.org/docs/7.0/syntax519.htm SQL Comments, Please! (Post by Markus Winand) https://modern-sql.com/caniuse/comments “While C-style block comments are passed to the server for processing and removal, SQL-standard comments are removed by psql.” https://www.postgresql.org/docs/current/app-psql.html marginalia https://github.com/basecamp/marginalia track_activity_query_size https://www.postgresql.org/docs/current/runtime-config-statistics.html#GUC-TRACK-ACTIVITY-QUERY-SIZE Custom Properties for Database Objects Using SECURITY LABELS (post by Andrei Lepikhov) https://www.pgedge.com/blog/custom-properties-for-postgresql-database-objects-without-core-patches ~~~ What did you like or not like? What should we…
PgDog update
OuvidoNik and Michael are joined by Lev Kokotov for an update on all things PgDog. Here are some links to things they mentioned: Lev Kokotov https://postgres.fm/people/lev-kokotov PgDog https://github.com/pgdogdev/pgdog Our first PgDog episode (March 2025) https://postgres.fm/episodes/pgdog Sharding pgvector (blog post by Lev) https://pgdog.dev/blog/sharding-pgvector Prepared statements and partitioned table lock explosion (series by Nik) https://postgres.ai/blog/20251028-postgres-marathon-2-009 ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork
RegreSQL
OuvidoNik and Michael are joined by Radim Marek from boringSQL to talk about RegreSQL, a regression testing tool for SQL queries they forked and improved recently. Here are some links to things they mentioned: Radim Marek https://postgres.fm/people/radim-marek boringSQL https://boringsql.com RegreSQL: Regression Testing for PostgreSQL Queries (blog post by Radim) https://boringsql.com/posts/regresql-testing-queries Discussion on Hacker News https://news.ycombinator.com/item?id=45924619 Radim’s fork of RegreSQL on GitHub https://github.com/boringSQL/regresql Original RegreSQL on GitHub (by Dimitri Fontaine) https://github.com/dimitri/regresql The Art of PostgreSQL (book) https://theartofpostgresql.com How to make the non-production Postgres planner behave like in production (how-to post by Nik) https://postgres.ai/docs/postgres-howtos/performance-optimization/query-tuning/how-to-imitate-production-planner Just because you’re getting an index scan, doesn't mean you can’t do better! (Blog post by Michael)…
Postgres year in review 2025
OuvidoNik and Michael discuss the events and trends they thought were most important in the Postgres ecosystem in 2025. Here are some links to things they mentioned: Postgres 18 release notes https://www.postgresql.org/docs/18/release-18.html Our episode on Postgres 18 https://postgres.fm/episodes/postgres-18 LWLock:LockManager benchmarks for Postgres 18 (blog post by Nik) https://postgres.ai/blog/20251009-postgres-marathon-2-005 PostgreSQL bug tied to zero-day attack on US Treasury https://www.theregister.com/2025/02/14/postgresql_bug_treasury PgDog episode https://postgres.fm/episodes/pgdog Multigres episode https://postgres.fm/episodes/multigres Neki announcement https://planetscale.com/blog/announcing-neki Our 100TB episode from 2024 https://postgres.fm/episodes/to-100tb-and-beyond PlanetScale for Postgres https://planetscale.com/blog/planetscale-for-postgres Oracle's MySQL job cuts https://www.theregister.com/2025/09/11/oracle_slammed_for_mysql_job Amazon Aurora DSQL is now generally available…
Archiving
OuvidoNik and Michael discuss a listener question about archiving a database. Here are some links to things they mentioned: Listener request to talk about archiving https://www.youtube.com/watch?v=KFRK8PiIvTg&lc=UgyiFrO37gEgUaVhRgN4AaABAg Our episode on “Is pg_dump a backup tool?” https://postgres.fm/episodes/is-pg_dump-a-backup-tool ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork
max_connections vs migrations
OuvidoNik and Michael discuss max_connections, especially in the context of increasing it to solve problems like migrations intermittently failing(!) Here are some links to things they mentioned: max_connections https://www.postgresql.org/docs/current/runtime-config-connection.html#GUC-MAX-CONNECTIONS Tweet about deployments vs connections issue https://x.com/brankopetric00/status/1991394329886077090 Nik tweet in response https://x.com/samokhvalov/status/1991465573684027443 Analyzing the Limits of Connection Scalability in Postgres (blog post by Andres Freund) https://www.citusdata.com/blog/2020/10/08/analyzing-connection-scalability/ Exponential Backoff And Jitter (blog post by Marc Brooker) https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/ ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of pgMustard Nikolay Samokhvalov,…
What's new in EXPLAIN
OuvidoNik and Michael discuss the various changes to EXPLAIN that arrived in Postgres 18. Here are some links to things they mentioned: EXPLAIN (official docs) https://www.postgresql.org/docs/current/sql-explain.html Using EXPLAIN (official docs) https://www.postgresql.org/docs/current/using-explain.html EXPLAIN glossary (pgMustard site) https://www.pgmustard.com/docs/explain Postgres 18 release notes https://www.postgresql.org/docs/release/18.0/ Enable BUFFERS with EXPLAIN ANALYZE by default (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c2a4078eb Our (first) BUFFERS by default episode https://postgres.fm/episodes/buffers-by-default Show index search count in EXPLAIN ANALYZE (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=0fbceae841cb5a31b13d3f284ac8fdd19822eceb Our episode on Skip scan with Peter Geoghegan https://postgres.fm/episodes/skip-scan What do the new Index Searches lines in EXPLAIN mean?…
Tens of TB per hour
OuvidoNik talks Michael through a recent benchmark he worked with Maxim Boguk on, to see how quickly they could provision a replica. Here are some links to things they mentioned: Ultra-fast replica creation with pgBackRest (blog post by Maxim Boguk and Nik) https://postgres.ai/blog/20251105-postgres-marathon-2-012-ultra-fast-replica-creation-pgbackrest Copying a database episode https://postgres.fm/episodes/copying-a-database Add snapshot backup support for PostgreSQL in wal-g (draft PR by Andrey Borodin) https://github.com/wal-g/wal-g/pull/2101 Multi-threaded pg_basebackup discussion 1: https://www.postgresql.org/message-id/flat/CAEHH7R4%3D_GN%2BLSsj0YZOXZ13yc%3DGk9umJOLNopjS%3DimK0c1mWA%40mail.gmail.com Multi-threaded pg_basebackup discussion 2: https://www.postgresql.org/message-id/flat/ io_method https://www.postgresql.org/docs/current/runtime-config-resource.html#GUC-IO-METHOD pgBackRest https://github.com/pgbackrest/pgbackrest Add sequence synchronization for logical replication (commit)…
Gapless sequences
OuvidoNik and Michael discuss the concept of gapless sequences — when you might want one, why sequences in Postgres can have gaps, and an idea or two if you do want them. And one quick clarification: changing the CACHE option in CREATE SEQUENCE can lead to even more gaps, the docs mention it explicitly. Here are some links to things they mentioned: CREATE SEQUENCE https://www.postgresql.org/docs/current/sql-createsequence.html Sequence Manipulation Functions https://www.postgresql.org/docs/current/functions-sequence.html One, Two, Skip a Few (post by Pete Hamilton from Incident io) https://incident.io/blog/one-two-skip-a-few Postgres sequences can commit out-of-order (blog post by Anthony Accomazzo / Sequin) https://blog.sequinstream.com/postgres-sequences-can-commit-out-of-order Logical Replication of sequences (hackers thread) https://www.postgresql.org/message-id/flat/CAA4eK1LC%2BKJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ%40mail.gmail.com Synchronization of sequences to subscriber (patch entry in commitfest)…
LWLocks
OuvidoNik and Michael discuss lightweight locks in Postgres — how they differ to (heavier) locks, some occasions they can be troublesome, and some resources for working out what to do if you hit issues. Here are some links to things they mentioned: Wait Events of Type LWLock https://www.postgresql.org/docs/current/monitoring-stats.html#WAIT-EVENT-LWLOCK-TABLE Our episode on (heavier) locks https://postgres.fm/episodes/locks Nik’s new marathon posts https://postgres.ai/blog/tags/postgres-marathon Postgres LISTEN/NOTIFY does not scale (blog post by Recall ai) https://www.recall.ai/blog/postgres-listen-notify-does-not-scale Explicit Locking https://www.postgresql.org/docs/current/explicit-locking.html pg_stat_activity https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEW Tuning with wait events for RDS for PostgreSQL https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Tuning.html MultiXact member exhaustion incidents (blog post by Cosmo Wolfe / Metronome)…
User management
OuvidoNik and Michael discuss user management in Postgres — how roles work, making administration easier, setting passwords, and avoiding them being logged. Here are some links to things they mentioned: Roles https://www.postgresql.org/docs/current/user-manag.html Privileges https://www.postgresql.org/docs/current/ddl-priv.html ALTER DEFAULT PRIVILEGES https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html GRANT https://www.postgresql.org/docs/current/sql-grant.html REASSIGN OWNED https://www.postgresql.org/docs/current/sql-reassign-owned.html ALTER ROLE (including SET) https://www.postgresql.org/docs/current/sql-alterrole.html CREATE ROLE https://www.postgresql.org/docs/current/sql-createrole.html Have I Been Pwned https://haveibeenpwned.com Pwned Passwords API https://haveibeenpwned.com/API/v3#PwnedPasswords Crunchy Data PostgreSQL Security Technical Implementation Guide (STIG) https://www.crunchydata.com/blog/announcing-the-crunchy-data-postgresql-stig Our episode on auditing…
Postgres 18
OuvidoNik and Michael discuss the newly released Postgres 18 — the bigger things it includes, some of their personal highlights, and some thoughts towards the future. Here are some links to things they mentioned: Postgres 18 announcement https://www.postgresql.org/about/news/postgresql-18-released-3142 Postgres 18 release notes https://www.postgresql.org/docs/18/release-18.html Skip scan episode with Peter Geoghegan https://postgres.fm/episodes/skip-scan Easier Postgres fine-tuning with online_advisor https://neon.com/blog/easier-postgres-fine-tuning-with-online_advisor pganalyze Index Advisor https://pganalyze.com/index-advisor BUFFERS by default https://postgres.fm/episodes/buffers-by-default Buffers II (the sequel) https://postgres.fm/episodes/buffers-ii-the-sequel Return of the BUFFERS https://postgres.fm/episodes/return-of-the-buffers UUID https://postgres.fm/episodes/uuid Partitioning by ULID https://postgres.fm/episodes/partitioning-by-ulid uuidv7 and uuid_extract_timestamp functions…
Gadget's use of Postgres
OuvidoNik and Michael are joined by Harry Brundage from Gadget to talk about their recent zero-downtime major version upgrade, how they use Postgres more generally, their dream database, and some challenges of providing Postgres as an abstracted service at scale. Here are some links to things they mentioned: Harry Brundage https://postgres.fm/people/harry-brundage Gadget https://gadget.dev Zero downtime Postgres upgrades using logical replication (blog post) https://gadget.dev/blog/zero-downtime-postgres-upgrades-using-logical-replication HOT updates https://www.postgresql.org/docs/current/storage-hot.html PgDog https://pgdog.dev Multigres https://multigres.com Neki https://www.neki.dev Running 10 Million PostgreSQL Indexes In Production (Heap blog post) https://www.heap.io/blog/running-10-million-postgresql-indexes-in-production pgwatch2 (Postgres.ai Edition) https://gitlab.com/postgres-ai/pgwatch2 Advanced query insights on AlloyDB https://cloud.google.com/alloydb/docs/advanced-query-insights-overview OrioleDB…
turbopuffer
OuvidoNik and Michael are joined by Simon Eskildsen from turbopuffer — among other things, they discuss ANN index types, tradeoffs that can make sense for search workloads, and when it can make sense to move search out of Postgres. Here are some links to things they mentioned: Simon Eskildsen https://postgres.fm/people/simon-eskildsen turbopuffer https://turbopuffer.com Use ULID Idempotency Keys (tip 6 in this blog post from Shopify) https://shopify.engineering/building-resilient-payment-systems PostgreSQL 18 Release Candidate 1 https://www.postgresql.org/about/news/postgresql-18-rc-1-released-3130 Understanding DiskANN (blog post by Junaid Ahmed) https://www.tigerdata.com/blog/understanding-diskann SPFresh: Incremental In-Place Update for Billion-Scale Vector Search (paper) https://arxiv.org/abs/2410.14452 Amazon S3 adds new functionality for conditional writes https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes Amazon S3 Vectors https://aws.amazon.com/s3/features/vectors…
When not to use Postgres
OuvidoNik and Michael discuss when not to use Postgres — specifically use cases where it still makes sense to store data in another system. Here are some links to things they mentioned: Just use Postgres (blog post by Ethan McCue) https://mccue.dev/pages/8-16-24-just-use-postgres Just Use Postgres for Everything (blog post by Stephan Schmidt) https://www.amazingcto.com/postgres-for-everything Real-time analytics episode https://postgres.fm/episodes/real-time-analytics Crunchy Data Joins Snowflake https://www.crunchydata.com/blog/crunchy-data-joins-snowflake Two sizes fit most: PostgreSQL and Clickhouse (blog post by Sid Sijbrandij) https://about.gitlab.com/blog/two-sizes-fit-most-postgresql-and-clickhouse pg_duckdb episode https://postgres.fm/episodes/pg_duckdb Cloudberry https://github.com/apache/cloudberry Time-series considerations episode https://postgres.fm/episodes/time-series-considerations Queues in Postgres episode https://postgres.fm/episodes/queues-in-postgres Large Objects…
Disks
OuvidoNik and Michael discuss disks in relation to Postgres — why they matter, how saturation can happen, some modern nuances, and how to prepare to avoid issues. Here are some links to things they mentioned: Nik’s tweet demonstrating a NOTIFY hot spot https://x.com/samokhvalov/status/1959468091035009245 Postgres LISTEN/NOTIFY does not scale (blog post by Recall ai) https://www.recall.ai/blog/postgres-listen-notify-does-not-scale track_io_timing https://www.postgresql.org/docs/current/runtime-config-statistics.html#GUC-TRACK-IO-TIMING pg_test_timing https://www.postgresql.org/docs/current/pgtesttiming.html PlanetScale for Postgres https://planetscale.com/blog/planetscale-for-postgres Out of disk episode https://postgres.fm/episodes/out-of-disk 100TB episode https://postgres.fm/episodes/to-100tb-and-beyond Latency Numbers Every Programmer Should Know https://gist.github.com/jboner/2841832 Fio https://github.com/axboe/fio ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube…
Multi-column indexes
OuvidoNik and Michael discuss multi-column indexes in Postgres — what they are, how to think about them, and some guidance around using them effectively. Here are some links to things they mentioned: Multicolumn Indexes (docs) https://www.postgresql.org/docs/current/indexes-multicolumn.html Our episode on Index-only scans https://postgres.fm/episodes/index-only-scans Combining Multiple Indexes (docs) https://www.postgresql.org/docs/current/indexes-bitmap-scans.html Enable BUFFERS with EXPLAIN ANALYZE by default https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c2a4078ebad71999dd451ae7d4358be3c9290b07 “PostgreSQL includes an implementation of the standard btree […] The only limitation is that an index entry cannot exceed approximately one-third of a page” https://www.postgresql.org/docs/current/btree.html Our episode on HOT updates https://postgres.fm/episodes/hot-updates Our episode on LIMIT vs Performance https://postgres.fm/episodes/limit-vs-performance ~~~ What did you like or not like? What should…
Self-driving Postgres
OuvidoNikolay and Michael discuss self-driving Postgres — what it could mean, using self-driving cars as a reference, and ideas for things to build and optimize for in this area. Here are some links to things they mentioned: Nikolay’s blog post on Self-driving Postgres https://postgres.ai/blog/20250725-self-driving-postgres SAE J3016 levels of driving automation https://www.sae.org/news/2019/01/sae-updates-j3016-automated-driving-graphic Oracle Autonomous Database https://www.oracle.com/uk/autonomous-database/ Self-Driving Database Management Systems (2017 paper) https://db.cs.cmu.edu/papers/2017/p42-pavlo-cidr17.pdf PGTune https://pgtune.leopard.in.ua/ pg_index_pilot https://gitlab.com/postgres-ai/pg_index_pilot/ [Vibe] Hacking Postgres with Andrey, Kirk, Nik – index bloat, btree page merge https://www.youtube.com/watch?v=D1PEdDcvZTw ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is…
caSe-inSENsiTive
OuvidoNikolay and Michael discuss case-insensitive data — when we want to treat columns as case-insensitive, and the pros and cons of using citext, functions like lower(), or a custom collation. Here are some links to things they mentioned: citext https://www.postgresql.org/docs/current/citext.html Our episode on over-indexing https://postgres.fm/episodes/over-indexing Nondeterministic collations https://www.postgresql.org/docs/current/collation.html#COLLATION-NONDETERMINISTIC How to migrate from Django’s PostgreSQL CI Fields to use a case-insensitive collation (blog post by Adam Johnson) https://adamj.eu/tech/2023/02/23/migrate-django-postgresql-ci-fields-case-insensitive-collation The collation versioning problem with ICU 73 (blog post by Daniel Vérité) https://postgresql.verite.pro/blog/2023/10/20/icu-73-versioning.html amcheck https://www.postgresql.org/docs/current/amcheck.html ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by…
Monitoring from Postgres AI
OuvidoNikolay 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://github.com/percona/pmm pgwatch https://github.com/cybertec-postgresql/pgwatch pgwatch Postgres AI Edition https://gitlab.com/postgres-ai/pgwatch2 libpg_query https://github.com/pganalyze/libpg_query The Four Golden Signals https://sre.google/sre-book/monitoring-distributed-systems/#xref_monitoring_golden-signals logerrors https://github.com/munakoiso/logerrors ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc!…
MultiXact member space exhaustion
OuvidoNikolay 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 Metronome) https://metronome.com/blog/root-cause-analysis-postgresql-multixact-member-exhaustion-incidents-may-2025 Multixacts and Wraparound (docs) https://www.postgresql.org/docs/current/routine-vacuuming.html#VACUUM-FOR-MULTIXACT-WRAPAROUND multixact.c source code https://github.com/postgres/postgres/blob/master/src/backend/access/transam/multixact.c Add pg_stat_multixact view for multixact membership usage monitoring (patch proposal by Andrew, needing review!) https://commitfest.postgresql.org/patch/5869/ PostgreSQL…
Multigres
OuvidoNikolay 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/citus PgDog https://github.com/pgdogdev/pgdog Myths and Truths about Synchronous Replication in PostgreSQL (talk by Alexander Kukushkin) https://www.youtube.com/watch?v=PFn9qRGzTMc Consensus algorithms at scale (8 part series by Sugu) https://planetscale.com/blog/consensus-algorithms-at-scale-part-1 A More Flexible Paxos (blog post by Sugu) https://www.sougou.io/a-more-flexible-paxos libpg_query https://github.com/pganalyze/libpg_query PL/Proxy https://github.com/plproxy/plproxy PlanetScale Postgres Benchmarking…
Multi-tenant options
OuvidoNikolay 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://www.postgresql.org/docs/current/ddl-rowsecurity.html Citus https://github.com/citusdata/citus Postgres.AI Bot https://postgres.ai/blog/20240127-postgres-ai-bot RLS Performance and Best Practices https://supabase.com/docs/guides/troubleshooting/rls-performance-and-best-practices-Z5Jjwv Case Gwen mentioned about the planner thinking an optimisation was unsafe Re-engineering Postgres for Millions of Tenants (Gwen’s recent talk at PGConf.dev) https://www.youtube.com/watch?v=EfAStGb4s88 Multi-tenant database the good,…
Mean vs p99
OuvidoNikolay 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/docs/current/pgstatstatements.html Our episode about track_planning https://postgres.fm/episodes/pg-stat-statements-track-planning pg_stat_monitor https://github.com/percona/pg_stat_monitor statement_timeout https://www.postgresql.org/docs/current/runtime-config-client.html#GUC-STATEMENT-TIMEOUT ~~~ What did you like or not like? What should we discuss next time? Let us know via a YouTube comment, on social media, or by commenting on our Google doc! ~~~ Postgres FM is produced by: Michael Christofides, founder of…