Skip to content
Episode from the podcast Postgres FM
Citus + StackGres artwork

Episode

Citus + StackGres

Released Friday, October 16th 2026 58 min

Show notes

About this episode

Nik 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-tortosaOngres https://ongres.comScaling 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=1rcbyIjA4gIOur episode with Sugu from Multigres https://postgres.fm/episodes/multigresOur (first) episode with Lev from PgDog https://postgres.fm/episodes/pgdogCitus https://github.com/citusdata/citusCitus goes fully open source (2022) https://www.citusdata.com/blog/2022/06/17/citus-11-goes-fully-open-source/6M requests per second using ClickHouse (blog post by Alex Bocharov / Cloudflare) https://blog.cloudflare.com/http-analytics-for-6m-requests-per-second-using-clickhouse/pg_ash https://github.com/NikolayS/pg_ash118 million queries per second on Neki (blog post by Florent Poinsard and Hirad Pourtahmasbi / PlanetScale) https://planetscale.com/blog/118-million-queries-per-second-on-nekiAnalyzing the Limits of Connection Scalability in Postgres (blog post by Andres Freund) https://www.citusdata.com/blog/2020/10/08/analyzing-connection-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.ai With credit to: Jessie Draws for the elephant artwork

More from Postgres FM

All episodes

Extensions on demand

1 hr 8 min

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://www.youtube.com/watch?v=7oeAAqU00zk   Nik 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. Here are some links to things they mentioned: Times are podcast times of the first mention. Main link [00:18:54] Dynamic containers for PostgreSQL: what we measured (DBLab Forge brief, PostgresAI) https://console.postgres.ai/shared/brief/c501d438-b872-4705-89a6-bdab30ea1680Álvaro and StackGres [00:00:25] Álvaro Hernández https://postgres.fm/people/alvaro-hernandez-tortosa[00:01:16] StackGres Containers (public beta; the images come from the registry host sgcr.io, and the demo used sgcr.dev, a dev instance) https://stackgres.io/containers[00:14:52] StackGres https://stackgres.io[00:20:55] PostgreSQL extensions in StackGres, loaded into running pods (docs) https://stackgres.io/doc/latest/features/extensions/[00:24:28] StackGres extensions cache, experimental (docs) https://stackgres.io/doc/latest/administration/extensions/cache/[01:04:08] Why Postgres extensions should be packaged and distributed as OCI images (Álvaro Hernández, 2024) https://ongres.com/blog/why-postgres-extensions-should-be-distributed-and-packaged-as-oci-images/Episodes [00:00:25] Our previous episode with Álvaro: Citus + StackGres https://postgres.fm/episodes/citus-stackgresHacking sessions [00:31:33] Hacking Postgres sessions with Andrey, Kirk and Nik (YouTube playlist, PostgresTV) https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRzPostgres and extensions [00:38:51] extension_control_path, new in Postgres 18 (docs) https://www.postgresql.org/docs/18/runti...

UUIDv4 vs UUIDv7

48 min

Tip: watch on YouTube. Since episode 193, the video shows charts and illustrations as we talk. https://www.youtube.com/watch?v=gf8e3JkQ_8M   Nik 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. Here are some links to things they mentioned: Times are podcast times of the first mention. Main link [00:00:34] UUIDv4 vs UUIDv7 vs int8 primary keys on Postgres 18 (DBLab Forge brief, PostgresAI) https://console.postgres.ai/shared/brief/9fffe2da-00c1-470b-a79d-a210ae2306bcHacking sessions [00:00:51] Hacking Postgres 101: ULID function (Postgres.TV, 2023) https://www.youtube.com/watch?v=YPq_hiOE-N8[00:00:51] Hacking Postgres sessions with Andrey, Kirk and Nik (YouTube playlist, PostgresTV) https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRzEpisodes [00:05:53] Our previous episode with Kirk, also built on DBLab Forge: Dump/restore done. Now what? https://postgres.fm/episodes/dump-restore-done-now-whatPostgres [00:01:34] Commit adding uuidv7() to Postgres 18 (78c5e141e9c1, 2024-12-11) https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=78c5e141e9c1[00:04:16] UUID functions, uuidv7() and uuid_extract_timestamp() (docs) https://www.postgresql.org/docs/18/functions-uuid.html[00:20:42] full_page_writes (docs) https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-FULL-PAGE-WRITES[00:25:01] wal_compression, lz4 and zstd (docs) https://www.postgresql.org/docs/current/runtime-config-wal.html#GUC-WAL-COMPRESSION[00:31:07] pg_stat_io (docs) https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-PG-STAT-IO-VIEWStandards and ID schemes [00:01:20] RFC 9562, Universally Unique IDentifiers (UUIDv7) https://www.rfc-editor.org/rfc/rfc9562[00:28:05] ULID spec https://github.com/ulid/spec[00:41:29]...

Dump/restore done. Now what?

50 min

Nik 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. Here are some links to things they mentioned: Times are podcast times of the first mention. Hacking sessions [00:00:27] Hacking Postgres sessions with Andrey, Kirk and Nik (YouTube playlist, PostgresTV) https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRz[00:00:27] Hacking Postgres website https://hacking.postgres.tv[00:00:27] Hacking Postgres Telegram group https://t.me/postgres_hackingEpisodes [00:00:27] Our previous episode with Kirk: GSoC B-Tree Merge https://postgres.fm/episodes/gsoc-btree-merge[00:03:23] Is pg_dump a backup tool? https://postgres.fm/episodes/is-pg_dump-a-backup-toolpgsql-hackers [00:15:39] pg_restore --include-analyze proposal (Jian He, 2025) https://www.postgresql.org/message-id/flat/CACJufxGx_YLLxmnZVMuUApiVYqjKrydvEQqD3qxhwM6e0_8jrQ%40mail.gmail.com[00:30:13] ANALYZE after restore (Christopher Kings-Lynne, 2002) https://www.postgresql.org/message-id/GNELIHDDFBOCMGBFGEFOOEOPCBAA.chriskl%40familyhealth.com.au[00:31:55] Statistics Import and Export (PG18 statistics transfer) https://www.postgresql.org/message-id/flat/CADkLM%3DfzX7QX6r78fShWDjNN3Vcr4PVAnvXxQ4DiGy6V%3D0bCUA%40mail.gmail.comCommits [00:04:39] Transfer statistics during pg_upgrade (adds statistics to pg_dump, PG18) https://github.com/postgres/postgres/commit/1fd1bd871012732e3c6c482667d2f2c56f1a9395[00:30:13] vacuumdb --analyze-only processes partitioned tables (Laurenz Albe, PG19) https://github.com/postgres/postgres/commit/6429e5b771dbb98aa56441677b79cdb58f6e1675[00:42:38] Set pd_prune_xid on insert (Melanie Plageman, PG19) https://github.com/postgres/postgres/commit/378a216187aea1b488ce60ed07dd1ac5c14a9984 ~~~ What did you like or not like? What should we discuss next time?...

GSoC B-Tree Merge

49 min

Nik 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-sayedKirk Wolak https://postgres.fm/people/kirk-wolakGoogle Summer of Code https://summerofcode.withgoogle.comPostgreSQL GSoC 2026 project ideas https://wiki.postgresql.org/wiki/GSoC_2026CMU Intro to Database Systems https://www.youtube.com/playlist?list=PLSE8ODhjZXjYMAgsGH-GtY5rJYZ6zjsd5Kirk, NIK, and Andrey’s Hacking Postgres sessions on YouTube https://www.youtube.com/playlist?list=PLH8y1BNPAKjKDdJA7sDmFWUkbbYux3TRzB-tree Index Bloat Reduction - Approach & Questions (Hackers thread, with patches) https://www.postgresql.org/message-id/flat/CANBEAPFq3YAOydjUS3xwcUG9L6e3WE5Z4nGPk_Q3RsjSFWTJNA%40mail.gmail.comB-tree merge visualizer https://kirkw.github.io/explainers/btree-merge-explainer.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 pgMustardNikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork

ClickHouse Managed Postgres

43 min

Nik 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-srirampurClickHouse Managed Postgres https://clickhouse.com/cloud/postgresClickPipes https://clickhouse.com/cloud/clickpipeswalshadow https://github.com/ClickHouse/walshadowpg_clickhouse https://github.com/clickHouse/pg_clickhouseClickHouse PostgreSQL powered by Ubicloud https://www.ubicloud.com/blog/clickhouse-postgresql-powered-by-ubicloudHacking Postgres logical decoding sessions https://hacking.postgres.tv/topics/logical-decoding/ wal-rus https://github.com/ClickHouse/wal-ruspg_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 pgMustardNikolay Samokhvalov, founder of Postgres.ai With credit to: Jessie Draws for the elephant artwork

This podcast, its content and its artwork are not owned by, affiliated with, or endorsed by Castquire.

Up next

  1. Nothing queued. Use + Queue on any episode to line it up.

0:00 0:00