Nik 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.htmlUsing EXPLAIN (official docs) https://www.postgresql.org/docs/current/using-explain.html EXPLAIN glossary (pgMustard site) https://www.pgmustard.com/docs/explainPostgres 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=c2a4078ebOur (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=0fbceae841cb5a31b13d3f284ac8fdd19822ecebOur episode on Skip scan with Peter Geoghegan https://postgres.fm/episodes/skip-scanWhat do the new Index Searches lines in EXPLAIN mean? https://www.pgmustard.com/blog/what-do-index-searches-in-explain-meanpg_stat_plans presentation by Lukas Fittl https://www.youtube.com/watch?v=26coQV3f-wkImprove EXPLAIN's display of window functions (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=8b1b34254Show Parallel Bitmap Heap Scan worker stats in EXPLAIN ANALYZE (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5a1e6df3bAdd information about WAL buffers being full (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=320545bfc ~~~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 pgMustardNikolay Samokhvalov, founder of Postgres.aiWith credit to:Jessie Draws for the elephant artwork
--------
45:13
--------
45:13
Tens of TB per hour
Nik 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-pgbackrestCopying a database episode https://postgres.fm/episodes/copying-a-databaseAdd snapshot backup support for PostgreSQL in wal-g (draft PR by Andrey Borodin) https://github.com/wal-g/wal-g/pull/2101Multi-threaded pg_basebackup discussion 1: https://www.postgresql.org/message-id/flat/CAEHH7R4%3D_GN%2BLSsj0YZOXZ13yc%3DGk9umJOLNopjS%3DimK0c1mWA%40mail.gmail.comMulti-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/pgbackrestAdd sequence synchronization for logical replication (commit) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=5509055d6956745532e65ab218e15b99d87d66ce Allow process priority to be set (pgBackRest feature added by David Steele) https://github.com/pgbackrest/pgbackrest/pull/2693 Hard limit on process-max (pgBackRest issue from 2019) https://github.com/pgbackrest/pgbackrest/issues/696 ~~~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 pgMustardNikolay Samokhvalov, founder of Postgres.aiWith credit to:Jessie Draws for the elephant artwork
--------
38:47
--------
38:47
Gapless sequences
Nik 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.htmlSequence Manipulation Functions https://www.postgresql.org/docs/current/functions-sequence.htmlOne, Two, Skip a Few (post by Pete Hamilton from Incident io) https://incident.io/blog/one-two-skip-a-fewPostgres sequences can commit out-of-order (blog post by Anthony Accomazzo / Sequin) https://blog.sequinstream.com/postgres-sequences-can-commit-out-of-orderLogical Replication of sequences (hackers thread) https://www.postgresql.org/message-id/flat/CAA4eK1LC%2BKJiAkSrpE_NwvNdidw9F2os7GERUeSxSKv71gXysQ%40mail.gmail.comSynchronization of sequences to subscriber (patch entry in commitfest) https://commitfest.postgresql.org/patch/5111/Get or Create (episode with Haki Benita) https://postgres.fm/episodes/get-or-createGerman tank problem https://en.wikipedia.org/wiki/German_tank_problem~~~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 pgMustardNikolay Samokhvalov, founder of Postgres.aiWith credit to:Jessie Draws for the elephant artwork
--------
39:49
--------
39:49
LWLocks
Nik 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-TABLEOur episode on (heavier) locks https://postgres.fm/episodes/locksNik’s new marathon posts https://postgres.ai/blog/tags/postgres-marathonPostgres LISTEN/NOTIFY does not scale (blog post by Recall ai) https://www.recall.ai/blog/postgres-listen-notify-does-not-scaleExplicit Locking https://www.postgresql.org/docs/current/explicit-locking.htmlpg_stat_activity https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-ACTIVITY-VIEWTuning with wait events for RDS for PostgreSQL https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Tuning.htmlMultiXact member exhaustion incidents (blog post by Cosmo Wolfe / Metronome) https://metronome.com/blog/root-cause-analysis-postgresql-multixact-member-exhaustion-incidents-may-2025pg_index_pilot https://gitlab.com/postgres-ai/pg_index_pilotMyths and Truths about Synchronous Replication in PostgreSQL (talk by Alexander Kukushkin) https://www.youtube.com/watch?v=PFn9qRGzTMcPostgres Indexes, Partitioning and LWLock:LockManager Scalability (blog post by Jeremy Schneider) https://ardentperf.com /2024/03/03/postgres-indexes-partitioning-and-lwlocklockmanager-scalability~~~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 pgMustardNikolay Samokhvalov, founder of Postgres.aiWith credit to:Jessie Draws for the elephant artwork
--------
38:22
--------
38:22
User management
Nik 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.htmlALTER DEFAULT PRIVILEGES https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.htmlGRANT https://www.postgresql.org/docs/current/sql-grant.htmlREASSIGN OWNED https://www.postgresql.org/docs/current/sql-reassign-owned.htmlALTER ROLE (including SET) https://www.postgresql.org/docs/current/sql-alterrole.html CREATE ROLE https://www.postgresql.org/docs/current/sql-createrole.htmlHave I Been Pwned https://haveibeenpwned.comPwned Passwords API https://haveibeenpwned.com/API/v3#PwnedPasswordsCrunchy Data PostgreSQL Security Technical Implementation Guide (STIG) https://www.crunchydata.com/blog/announcing-the-crunchy-data-postgresql-stigOur episode on auditing https://postgres.fm/episodes/auditing~~~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 pgMustardNikolay Samokhvalov, founder of Postgres.aiWith credit to:Jessie Draws for the elephant artwork