PostgresAI

127 posts

PostgresAI banner
PostgresAI

PostgresAI

@postgres_ai

We build Self-Driving Postgres and help fast-growing startups scale their databases, workloads, and related operations

remote Katılım Temmuz 2020
2 Takip Edilen854 Takipçiler
PostgresAI retweetledi
Brian Thorne
Brian Thorne@hardbyte_nz·
@samokhvalov you've done an amazing job with pgque. I ran a new comparison of postgresql based job-queue (ish) systems over the weekend.
Brian Thorne tweet mediaBrian Thorne tweet media
English
1
2
14
1.2K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
PgQue v0.1.0 is out. PgQ -- the Postgres queue system built at Skype 20 years ago for 1B-user-scale workloads -- repackaged for the managed-Postgres era. One SQL file. No C extension. No external daemon. pg_cron to tick. Why bother reviving a 2007 architecture? Every major Postgres queue in production today uses some flavor of SKIP LOCKED + UPDATE/DELETE. It works under light load. When you have more data and higher load, it degrades predictably. Then you get posts like these: - Brandur at Heroku, 2015: 60k job backlog in one hour from a single open transaction - PlanetScale, 2026: death spiral at 800 jobs/sec - River issue #59, awa issue #169 and so on, Oban's partitioning work, PGMQ's autovacuum tuning guide and duct-taping with pg_partman The core issue is how Postgres MVCC is implemented and how we deal with it. Dead tuples in the hot path, xmin horizon pinned, vacuum falling behind, query performance quickly degrades. This happens every time you run pg_dump, execute an analytical query, or have a lagging/unused logical replication slot. PgQ solved this in 2007 with snapshot-based batching and TRUNCATE rotation -- zero dead tuples in the event path, by design. But PgQ needed a C extension and an external daemon. Which means it doesn't run on RDS, Aurora, Cloud SQL, AlloyDB, Supabase, or Neon -- i.e., where most Postgres lives now. PgQue closes that gap. 💎 Pure SQL + PL/pgSQL (PgQ engine) 👩‍💻 \i sql/pgque.sql -- you're done 🕑 pg_cron replaces pgqd (optional, recommended) 💻 Python, Go, TypeScript client examples shipped 💙 Apache 2.0 Trade-off: end-to-end event delivery latency is up to a second, it depends on ticking frequency. If you need sub-3ms job dispatch, use River, Oban, or graphile-worker (and avoid anything that blocks xmin horizon). If you need high-throughput event streaming with fan-out inside Postgres -- Kafka-shaped, without Kafka and dealing with transactional outbox implementation -- this is the right shape of tool. Kudos to Marko Kreen and Skype engineers who implemented this decades ago, for the original PgQ, and to Alexander Kukushkin whose recent "Rediscovering PgQ" talk brought this quiet corner of the Postgres ecosystem back into view. Stars, issues, PRs, and honest criticism all welcome. Link 👇
GIF
English
7
51
351
34.3K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
rpg 0.10 release has improvements /ash – redesigned navigation: - ← → to pan through history - "cursor" to see wait event details for each ASH sample - zoom in/out are now on [ and ] And of course, there is new secret /rpg command. + a bunch of fixes and small improvements rpg is my FOSS experiment to rewrite psql in Rust, add TUI components, AI integration, ASH analysis, etc. – and eventually get modern CLI/TUI for Postgres
English
1
4
14
1.9K
PostgresAI retweetledi
Postgres FM
Postgres FM@PostgresFM·
New episode: "Long-running transactions" Nik and Michael discuss long-running transactions, including when they're harmless, when they cause issues, and how to mitigate those issues. 🎧 postgres.fm/episodes/long-… 📺 youtu.be/uSUpbUJM5Kk
YouTube video
YouTube
Postgres FM tweet media
English
0
5
37
1.9K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
For fun, I rewrote psql in Rust and integrated it with AI meet "rpg" -- an experimental CLI maybe, at some point, it will bring ideas to psql itself thoughts? link in the 1st comment
GIF
English
6
6
39
4.5K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
pg_ash v1.3 released -- Active Session History for Postgres, pure SQL. New in 1.3: - pg_cron now optional -- works with external schedulers - set_debug_logging() -- RAISE LOG per sampled session - pgss-dependent functions fail fast with clear errors - Azure Flexible Server compatibility - PG14-18 tested Install: \i sql/ash-install.sql No extensions, no restart. Works on RDS, Cloud SQL, AlloyDB, Supabase, etc.
Nik Samokhvalov tweet media
English
2
16
52
3K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
pg_ash is out Postgres has no session history. When something was slow an hour ago, there's nothing to look at. pg_ash fixes that -- pure SQL, one file install, works on RDS/Cloud SQL/Supabase/self-hosted, anywhere where you have pg_stat_statements and pg_cron. No extension, no restarts, no provider approval. Just \i one file.
Nik Samokhvalov tweet media
English
10
38
176
15.3K
PostgresAI
PostgresAI@postgres_ai·
postgresai 0.14 is out! Express health checks via `postgresai checkup`, Claude Code plugin, Supabase support, MCP tools, Bun for performance, query texts in Top-N charts, version/build timestamps, updated index analysis panels, and much more start here: npx postgresai@latest
PostgresAI tweet media
English
1
1
9
2.6K
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
finally in @postgres_ai's Grafana -- query texts everywhere in query analysis, not only queryids with smart truncation
Nik Samokhvalov tweet media
English
0
1
11
885
PostgresAI
PostgresAI@postgres_ai·
Check your DB for unused/redundant indexes now, keep your index set lean: npm i -g postgresai postgresai checkup <DBURL> --json --check-id H002 # unused indexes postgresai checkup <DBURL> --json --check-id H004 # redundant indexes -- then feed it to your AI dev tool 🪄
English
0
0
0
102
PostgresAI retweetledi
Nik Samokhvalov
Nik Samokhvalov@samokhvalov·
This is awesome – one more observability gap is closed in Postgres 19devel! after Metronome's Postgres MultiXact member space exhaustion incidents in 2025 (postgres.fm/episodes/multi…), we had a couple of more cases, when customers came with the very same problem So for quite some time @postgres_ai monitoring covers it already – we see it as a mission to cover all cases we've learned so all customers and users have tooling to avoid various cliffs and in case shit happens – how to escape ASAP. So we added it, but only for self-hosted Postgres and RDS (they expose it with special functions) – monitoring of pg_multixact/members subdir size. Great to see that this kind of monitoring will be possible for all Postgres users when 19 is out – already planned to ship it – gitlab.com/postgres-ai/po…
Noriyoshi Shinoda@nori_shinoda

PostgreSQL 19 dev: Add pg_get_multixact_stats() Author: Naga Appani git.postgresql.org/gitweb/?p=post…

English
0
2
10
1.1K
PostgresAI
PostgresAI@postgres_ai·
PostgresAI demo 2 - automated database health What if you clicked "Resolve" and got a PR What if index bloat just... fixed itself? Now it does.
English
0
1
7
2.4K