Postgres FM

Postgres FM

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

All Postgres FM episodes

  • psql vs GUIs

    Nikolay and Michael discuss command line and graphical user interfaces for Postgres — what they are, some tips and tricks for learning, and what we each use and prefer.
     
    Here are links to a few things we mentioned: 

    • psql (docs)
    • psql is awesome! (talk by Lætitia Avrot)
    • psql tips (site by Lætitia Avrot)
    • pgAdmin
    • Postico 
    • DBeaver
    • DataGrip
    • PgManage (new Command Prompt fork of OmniDB) 
    • PopSQL
    • postgres_dba
    • pspg
    • Materialized views episode
    • pgcli


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


    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 
    32 min
  • Upgrades

    Nikolay and Michael discuss major and minor version Postgres upgrades — what they are, how often they come out, and how regularly we should be upgrading.
     
    Here are links to a few things we mentioned: 

    • Postgres versioning policy 
    • why-upgrade (by depesz)
    • postgresqlco.nf (by Ongres)
    • postgresql.conf comparison (by Rustproof Labs) 
    • pg_upgrade
    • Logical replication 
    • CHECKPOINT
    • amcheck
    • Locale data changes (e.g. glibc upgrades)
    • ANALYZE
    • Upgrades are hard (summary of panel discussion by Andreas 'ads' Scherbaum)
    • spilo
    • Recent pgsql hackers discussion about using logical and pg_upgrade together


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


    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 
    41 min
  • Wait events

    Nikolay and Michael discuss wait events — what they are, why we have them, and how to use them to help diagnose performance issues.
     
    Here are links to a few things we mentioned: 

    • Wait events table (docs)
    • 9.6 release notes
    • PostgreSQL Scalability (blog post by Alexander Korotkov)
    • Wait event analysis in pganalyze
    • auto_explain
    • Database Lab Engine
    • track_io_timing
    • pg_test_timing
    • pgBadger
    • Coroot
    • Okmeter
    • pgwatch2 Postgres.ai Edition
    • pg_wait_sampling
    • pgsentinel
    • Datadog
    • AWS RDS docs for PostgreSQL wait events
    • pgMustard newsletter
    • PASH Viewer
    • pgCenter
    • Intro to query optimisation episode
    • Monitoring checklist episode


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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 
    32 min
  • TOAST

    Nikolay and Michael discuss TOAST (The Oversized-Attribute Storage Technique) — what it is, how it works, and some general things to be aware of.
     
    Here are links to a few things we mentioned: 

    • TOAST docs
    • TOAST wiki
    • Hussein Nasser on rows per page (Twitter)
    • Toasting in action (dbi services blog)
    • Interview with Peter Zaitsev (Postgres TV)
    • Building columnar compression in a row-oriented database (Timescale blog post)
    • The Surprising Impact of Medium-Size Texts on PostgreSQL Performance (blog post by Haki Benita)
    • PostgreSQL at Scale: Saving Space Basically for Free (blog post by Braintree on column Tetris)
    • postgres_dba alignment padding query 


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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
  • JSON

    Nikolay and Michael discuss JSON — our options for storing it in Postgres, whether or when we should, as well as a brief intro and some tips for JSON functions available.
     
    Here are links to a few things we mentioned: 

    • hstore
    • XML type
    • XML functions
    • JSON types
    • JSON functions
    • JSONB indexing
    • NULLS episode
    • Why Postgres is popular episode
    • PostgreSQL 12 release notes
    • What’s New in SQL:2016 (blog post by Markus Winand)
    • SQL/JSON is postponed (blog post by depesz) 
    • JSON[b] Roadmap (talk by Oleg Bartunov)
    • Slides, with benchmarks
    • RUM access method
    • JSON in PostgreSQL: how to use it right (blog post by Laurenz Albe from Cybertec)
    • pg_jsonschema
    • TOAST_TUPLE_TARGET and TOAST_TUPLE_THRESHOLD 
    • The Surprising Impact of Medium-Size Texts on PostgreSQL Performance (blog post by Haki Benita) 
    • Aggregate functions
    • How to store and index json data (blog post by ScaleGrid)
    • When to avoid JSONB (blog post by Heap)
    • FerretDB


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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 
    32 min
  • Real-time analytics

    Nikolay and Michael discuss real-time analytics — what it means, what the options are, and some tips if you're trying to implement it within Postgres.
     
    Here are links to a few things we mentioned: 

    • Loose index scan / skip scan with recursive CTE (wiki)
    • Zheap (wiki)
    • cstore_fdw (now part of Citus)
    • Timescale compression docs
    • Hydra founders interview (on Postgres TV)
    • Materialised views episode 
    • pg_ivm
    • Timescale continuous aggregates docs
    • Clickhouse
    • Snowflake
    • Replication episode
    • Timescale bottomless storage on S3 (blog post)
    • pg_partman
    • Querying Postgres from DuckDB (blog post)
    • Heap blog (filter by “Engineering”)
    • Incremental View Maintenance (wiki)
    • PostgreSQL HyperLogLog  
    • Faster counting (by Joe Nelson on the Citus blog)


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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
  • Benchmarking

    Nikolay and Michael discuss benchmarking — reasons to do it, and some approaches, tools, and resources that can help.
     
    Here are links to a few things we mentioned: 

    • Towards Millions TPS (blog post by Alexander Korotkov)
    • Episode on testing 
    • Episode on buffers 
    • pgbench
    • sysbench
    • Improving Postgres Connection Scalability (blog post by Andres Freund)
    • pgreplay
    • pgreplay-go
    • JMeter
    • pg_qualstats
    • pg_query
    • Database experimenting/benchmarking (talk by Nikolay, 2018)
    • Database testing (talk by Nikolay at PGCon, 2022)
    • Systems Performance (Brendan Gregg’s book, chapter 12)
    • fio
    • Netdata
    • Subtransactions Considered Harmful (blog post by Nikolay including Netdata exports)
    • WAL compression benchmarks (by Vitaly from Postgres.ai)
    • Dumping/restoring a 1 TiB database benchmarks (by Vitaly from Postgres.ai)
    • PostgreSQL on EXT3/4, XFS, BTRFS and ZFS (talk slides from Tomas Vondra)
    • Insert benchmark on ARM and x86 cloud servers (blog post by Mark Callaghan)


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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 
    37 min
  • Default configuration

    Nikolay and Michael discuss the default config — some tools and principles you can use to customise it, as well as several parameters you probably always want to change.

    Here are links to a few things we mentioned: 

    • shared_buffers
    • Andres Freund tweets about shared_buffers 
    • PGTune Leopard 
    • Cybertec Configurator
    • pg_stat_statements
    • JIT configuration
    • postgresqlco.nf
    • annotated.conf
    • OtterTune
    • work_mem
    • random_page_cost
    • max_connections
    • What to log
    • max_wal_size
    • WAL and checkpoint tuning episode 
    • effective_cache_size
    • Intro to Performance Tuning and Optimization (EDB guide)
    • max_parallel_workers_per_gather 


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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 
    33 min
  • Infra cost optimization

    Here are links to a few things we mentioned: 

    • The Cost of Cloud, a Trillion Dollar Paradox (blog post from Andreessen Horowitz)
    • OVH
    • Hetzner
    • postgresql_cluster
    • Why we're leaving the cloud (blog post by DHH from Basecamp)
    • Managed services vs. DIY episode
    • ec2instances.info
    • Vantage
    • Postgres TV episode with Everett Berry from Vantage
    • Migrating to Aurora: easy except the bill (blog post by Kimberly Nicholls from Gridium)
    • Database Lab Engine
    • Postgres.ai consulting
    • Netdata
    • sysbench
    • fio
    • Query macro analysis episode
    • Top queries by buffers (Gist from Michael)


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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 
    28 min
  • Auditing

    Here are links to a few things we mentioned: 

    • Crunchy Data PostgreSQL Security Technical Implementation Guide (STIG)
    • pgAudit (site)
    • pgAudit (repo)
    • noset (extension)
    • Splunk
    • Kibana
    • Timescale
    • CREATE TRIGGER docs
    • Transition table triggers (blog post by David Fetter)
    • Table Audit (blog post by Lorenzo Alberton)
    • Row change auditing options (blog post by CYBERTEC)
    • Hydra founders interview (on Postgres TV)
    • max_slot_wal_keep_size
    • eBPF
    • Building a perf-like tool for PostgreSQL (talk by Ronan Dunklau)
    • Party tricks for PostgreSQL: perf, ftrace and bpftrace (talk by Dmitry Dolgov)


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


    What did you like or not like? What should we discuss next time? Let us know by tweeting us on @samokhvalov / @michristofides / @PostgresFM, 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