Postgres FM

Postgres FM

By Nikolay Samokhvalov and Michael ChristofidesNewsTechnologyTech News
Download on the App Store

All Postgres FM episodes

  • Zero-downtime migrations

    Nikolay and Michael discuss zero-downtime schema migrations — why they're a challenge, a variety of different cases, and some things you can do to achieve them.
     
    Here are links to a few things we mentioned: 

    • Comparison of JOINS: MongoDB vs. PostgreSQL (blog post by Michael Stonebraker and Álvaro Hernández)
    • Common DB schema change mistakes (blog post by Nikolay)
    • lock_timeout and retries (blog post by Nikolay)
    • lock_timeout
    • Fast Column Creation with Defaults (blog post by Brandur)
    • Database Schema Changes Without Downtime (new version of blog post by Braintree)
    • Zero-downtime Postgres migrations - the hard parts (blog post from GoCardless)
    • GitLab migration_helpers.rb 
    • GitLab migration style guide
    • dblab 

    ~~~

    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!

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    29 min
  • Parallelism

    Nikolay and Michael discuss parallelism — both parallel query execution and other parallel operations.
     
    Here are links to a few things we mentioned: 

    • Parallel query (docs)
    • Parallelism in PostgreSQL 11 (talk by Thomas Munro)
    • Parallelism in PostgreSQL 15 (talk by Thomas Munro)
    • Towards Millions TPS (blog post by Alexander Korotkov)
    • Memory resource consumption (docs)
    • Our episode about index maintenance
    • Our episode about partitioning 
    • Patch to make postgres_fdw parallel-safe (by Swarm64) 
    • PostgreSQL Parallelism Do’s and Don’ts (talk by Sebastian Dressler)
    • Increasing max_parallel_workers_per_gather (blog post by Michael)


    ~~~


    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!

    If you would like to share this episode, here's a good link (and thank you!)

    ~~~


    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    45 min
  • Corruption

    Nikolay and Michael discuss database corruption — various types, how they can come about, and what to do (and not do) if you come across it.
      
    Here are links to a few things we mentioned: 

    • The dangers of streaming across versions of glibc (TripAdvisor mailing list thread)
    • The floor is Java meme
    • Data Corruption talk by Sebastian Webber (on Postgres TV) 
    • Data corruption monitoring & troubleshooting talk by Andrey Borodin (on Postgres TV)
    • Postgres data corruption (document from Nikolay) 
    • Data Corruption and Bugs Runbook (document from Nikolay)
    • Corruption (Postgres wiki)
    • Checksums
    • pg_checksums
    • Original pg_checksums (by Credativ)
    • amcheck
    • Our episode on index maintenance
    • 14.4 release notes about create index / reindex concurrently issue and fix
    • amcheck to check unique constraints in btree indexes (Commitfest entry)
    • amcheck verification of GiST and GIN (Commitfest entry)
    •  How to corrupt your Postgres database (blog post from Cybertec)
    • Christophe Pettus talk
    • Christophe Pettus slides
    • pg_hexedit
    • pageinspect
    • pg_catcheck


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on YouTube, on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)

    ~~~


    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard


    With special thanks to:

    • Jessie Draws for the amazing artwork 
    43 min
  • ChatGPT x 
PostgreSQL

    Nikolay and Michael discuss using ChatGPT for Postgres tasks — should you, if so what for, and some things to be mindful of!
     
    Here are links to a few things we mentioned: 

    • ChatGPT
    • Nikolay’s polls on Twitter and on LinkedIn 
    • The Art of PostgreSQL (book by Dimitri Fontaine)
    • SQL Performance Explained (book by Markus Winand)
    • Nikolay’s YouTube correction about deletes and index amplification
    • Don’t use ChatGPT to solve problems (blog post by Christophe Pettus)
    • Query optimization session with ChatGPT, Michael, and Nikolay (on YouTube)
    • DBeaver SmartAssistance feature  
    • Depesz anonymization feature


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on YouTube, on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    36 min
  • pg_stat_statements

    Nikolay and Michael discuss pg_stat_statements — why everyone should use it, but also some downsides!
     
    Here are links to a few things we mentioned: 

    • pg_stat_statements (docs)
    • pg_stat_statements (PgPedia)
    • PGSQL Phriday
    • Observer effect in pg_stat_statements and pg_stat_kcache (Postgres Hacking session on Postgres TV) 
    • track_io_timing (docs)
    • Overhead comment (by Tom Kate, via Jeremy Schneider) 
    • pg_stat_monitor
    • PGCon
    • Our episode on query analysis
    • Marginalia 


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on YouTube, on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    46 min
  • auto_explain

    Nikolay and Michael discuss auto_explain — what it is, how it can help, and how to check it's overhead.
     
    Here are links to a few things we mentioned: 

    • auto_explain (docs)
    • ScaleGrid guide to auto_explain 
    • Can auto_explain, with timing, have low overhead? (Blog post by Michael)
    • pgBadger 
    • pg_stat_monitor
    • EXPLAIN ANALYZE may be lying to you (blog post by Álvaro from Ongres)
    • pg_test_timing
    • Our episode on benchmarking
    • Database Lab Engine


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on YouTube, on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    38 min
  • Queues in Postgres

    Nikolay and Michael discuss queues in Postgres — the pros and cons vs dedicated queuing tools, and some tips for scaling.
     
    A couple of apologies-in-advance: 

    1. Near the end, we incorrectly say "idempotent" when we meant "stateless", and also 50 TPS instead of 500 TPS
    2. We also had a couple of audio issues, sorry!


    Here are links to a few things we mentioned: 

    • Recent discussion on Hacker News
    • PgQ
    • What is SKIP LOCKED (blog post by Craig Ringer) 
    • autovacuum
    • Postgres queues (blog post by Brandur)
    • pg_repack
    • Our episode on partitioning
    • Nikolay’s Twitter poll
    • Subtransactions Considered Harmful (blog post by Nikolay)


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    40 min
  • Read-only considerations

    Nikolay and Michael discuss a listener request — special considerations for databases that are used in a read-only mode all day, and get an update at night with additional data.

    Here are links to a few things we mentioned: 

    • Index-only scans
    • Vacuum
    • UK Covid-19 dashboard
    • pg_repack
    • Partitioning
    • Our episode on BRIN indexes
    • Always load sorted data (blog post by Haki Benita)
    • GIN indexes: the good and the bad (blog post by Lukas Fittl)
    • Our episode on materialised views
    • pg_buffercache
    • Towards Millions TPS (blog post by Alexander Korotkov)
    • Postgres WASM (by Snaplet and Supabase)
    • Yugabyte
    • AWS Aurora 
    • Continuous Archiving and Point-in-Time Recovery (docs)
    • Our episode on checkpoint tuning
    • Our episode on partitioning
    • PgQ
    • Neon branching
    • Database Lab Engine
    • Cluster

    ~~~


    What did you like or not like? What should we discuss next time? Let us know on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard

    With special thanks to:

    • Jessie Draws for the amazing artwork 
    40 min
  • Partitioning

    Nikolay and Michael discuss table partitioning — what it is, why and when it's helpful, and some considerations for your partition key.
     
    Here are links to a few things we mentioned: 

    • Partitioning docs
    • pg_partman
    • Index maintenance episode 
    • Timescale partitioning
    • pg_cron
    • Xtreme PostgreSQL (talk by Christophe Pettus)
    • Database Antipatterns (also by Christophe, slides 46-49)
    • Understanding an outage (blog post by Duffel)


    ~~~


    What did you like or not like? What should we discuss next time? Let us know on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)


    ~~~

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard


    With special thanks to:

    • Jessie Draws for the amazing artwork 
    35 min
  • Peter Zaitsev

    This week we're sharing an edited version of Nikolay's recent interview with Peter Zaitsev from Percona — they discuss MySQL vs Postgres, Percona’s success, open source licenses, FerretDB, and databases on Kubernetes… phew!
     
    And here are some links to a few things mentioned: 

    • Percona
    • pgCloudHacker browser extension 
    • PMM
    • Percona Distribution for PostgreSQL
    • FerretDB
    • Peter's Twitter profile
    • Peter's LinkedIn profile


    ------------------------


    What did you like or not like? What should we discuss next time? Let us know on social media, or by commenting on our Google doc.

    If you would like to share this episode, here's a good link (and thank you!)

    Postgres FM is brought to you by:

    • Nikolay Samokhvalov, founder of Postgres.ai
    • Michael Christofides, founder of pgMustard


    With special thanks to:

    • Jessie Draws for the amazing artwork 
    44 min