News for hackers. Stuff that matters.
Re:Just Use Postgres for Durable Workflows by buremba on Thursday May 28, 2026 @03:39PM (#48314331)
All you need is Postgres until you scale into TBs of data. We use Postgresql as a durable workflow engine, vector search, time-series data, BM25 search, OLTP/OLAP engine, and a queue. It's basically the only dependency we have for https://lobu.ai

The main benefit is centralizing all the data in one place so we don't need to worry about copying data in between multiple systems. Once something becomes the bottleneck, you can eventually migrate to a purpose specific tool to scale out.To be honest, LISTEN/NOTIFY in my opinion is the most fragile part of PG but it's fine as start until you scale out.

Re:Just Use Postgres for Durable Workflows by throwaway7783 on Thursday May 28, 2026 @03:50PM (#48314435)
I'm in the same camp. Do you use any specific extensions? Especially for OLAP and time series (partitioned tables + related extensions work fine, but curious if you use anything else)
Re:Just Use Postgres for Durable Workflows by buremba on Thursday May 28, 2026 @04:05PM (#48314663)
The native extensions are fine but I don't have good experience with any third party extensions, so far tried Timescale, pg_lake, citus, and pgvectorscale. They look very appealing but it's usually a trap as you can't get the value without using the vendor's cloud offerings.

I think if you grow enough to look for these extensions, it's usually better to bet on purpose-specific tooling. For example, I use DuckDB/Iceberg combination extensively for columnar data and connect DuckDB to PG when I need it.

Re:Just Use Postgres for Durable Workflows by throwaway7783 on Thursday May 28, 2026 @06:19PM (#48316329)
Fair enough. How do you do BM25?
Re:Just Use Postgres for Durable Workflows by osigurdson on Thursday May 28, 2026 @06:09PM (#48316218)
From experience, I'd suggest using ClickHouse beyond a few billion rows of timeseries data in Postgres.
Re:Just Use Postgres for Durable Workflows by throwaway7783 on Thursday May 28, 2026 @06:18PM (#48316324)
Nice thing about our use case is that its not strictly analytics, but looking at most recent raw data. ClickHouse is definitely the powerhouse for analytics
Re:Just Use Postgres for Durable Workflows by osigurdson on Thursday May 28, 2026 @07:09PM (#48316811)
ClickHouse is fine for looking at recent data (with simple / efficient TTL). I'd still (probably) use Postgres for smaller scale things however.
Re:Just Use Postgres for Durable Workflows by hmaxdml on Thursday May 28, 2026 @03:46PM (#48314392)
Listen/notify is poised to become much better in PG 18 and 19
Re:Just Use Postgres for Durable Workflows by stuartaxelowen on Thursday May 28, 2026 @03:55PM (#48314500)
Why’s that?
Re:Just Use Postgres for Durable Workflows by TkTech on Thursday May 28, 2026 @04:17PM (#48314836)
In pg19 https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit... will land, which significantly improves NOTIFY performance. Right now LISTEN/NOTIFY doesn't scale to very busy instances because a `NOTIFY` within a transaction takes a global lock.
Re:Just Use Postgres for Durable Workflows by ivanr on Thursday May 28, 2026 @04:19PM (#48314861)
Re:Just Use Postgres for Durable Workflows by doctorpangloss on Thursday May 28, 2026 @05:47PM (#48315988)
Well another POV is, AWS sells RDS instances capable of global lock NOTIFY. Clearly people have been using it despite it being really slow.

It's a terrible architecture but does it matter? This article should really say "AWS is a useful but expensive way to run your apps," which isn't say much of anything at all.

Re:Just Use Postgres for Durable Workflows by pphysch on Thursday May 28, 2026 @03:50PM (#48314422)
I don't see logs mentioned. I agree with most those applications but would keep my OLAP stuff (metrics, logs, traces) in a separate store like VictoriaMetrics, both for capacity and read activity.
Re:Just Use Postgres for Durable Workflows by buremba on Thursday May 28, 2026 @04:00PM (#48314587)
Yeah I have logs in Sentry, which also uses Postgresql.
Re:Just Use Postgres for Durable Workflows by valyala on Thursday May 28, 2026 @06:27PM (#48316402)
Re:Just Use Postgres for Durable Workflows by buremba on Thursday May 28, 2026 @07:56PM (#48317192)
Thanks for correcting me, I was wondering why I got downvoted. :)

Clickhouse is also great for OLAP for sure

Re:Just Use Postgres for Durable Workflows by TkTech on Thursday May 28, 2026 @04:30PM (#48315026)
pg_timescale can take you pretty far for metrics and would be Good Enough for almost all users. Totally agree on raw, high-volume logs though.
Re:Just Use Postgres for Durable Workflows by tibbon on Thursday May 28, 2026 @04:28PM (#48314996)
But when you hit that wall, it is hard to stop and convince people to use different patterns and systems. I've seen so many tables go from "it will only be a few thousand rows" to suddenly several TB and then people are looking confused when performance and db admin tasks get really difficult.

I'm working at a scale where almost every day I have to ask people "are you use you need to treat that as relational data? It doesn't seem relational"

Re:Just Use Postgres for Durable Workflows by alexwennerberg on Thursday May 28, 2026 @06:27PM (#48316406)
> But when you hit that wall, it is hard to stop and convince people to use different patterns and systems. I've seen so many tables go from "it will only be a few thousand rows" to suddenly several TB and then people are looking confused when performance and db admin tasks get really difficult.

It's much, much worse in my experience to have to develop for the opposite -- working on a system that was designed for an imagined "infinite" scale that in reality like 100GB and a few transactions a minute.

Re:Just Use Postgres for Durable Workflows by dieselgate on Thursday May 28, 2026 @05:19PM (#48315650)
> are you use you need to treat that as relational data?

Is this intended to be "you sure you need..."?

Re:Just Use Postgres for Durable Workflows by turkeyboi on Thursday May 28, 2026 @06:19PM (#48316331)
Obviously, yes
Re:Just Use Postgres for Durable Workflows by sroussey on Thursday May 28, 2026 @05:18PM (#48315640)
Use different “databases” besides public at the very start. No joins between them. You will be in a good position to just split the postgres instance by those at a later date. They will have different usage patterns than the merged version you have now, and will be easier to optimize and will buy you some time. And time is all you need.
Re:Just Use Postgres for Durable Workflows by gjvc on Thursday May 28, 2026 @06:26PM (#48316391)
"public" is not a database, it is a schema within a database.

apropos bad naming, postgresql authors are not forgiven for naming all the databases on a single host a "cluster". I mean __really__.

Re:Just Use Postgres for Durable Workflows by cultofmetatron on Thursday May 28, 2026 @05:20PM (#48315660)
conversely, startups that start scaling for tbs of data never make it to needing tbs of data. They burn too much energy scaling when they don't yet have a product people want yet.
Re:Just Use Postgres for Durable Workflows by nicoburns on Thursday May 28, 2026 @06:40PM (#48316554)
Yep. I've also seen systems that were slow with <10GB data of because of bad application of patterns that were supposedly "scalable" (pulling entire tables out of the database to implement joins in application code because "nosql is faster" is not actually fast).
Re:Just Use Postgres for Durable Workflows by ceres on Thursday May 28, 2026 @05:23PM (#48315691)
Just an fyi, when I try to sign in with google for your app I get the message: "The app is requesting access to sensitive info in your Google Account. Until the developer (*reka*kc*@gmail.com) verifies this app with Google, you shouldn't use it."
Re:Just Use Postgres for Durable Workflows by buremba on Thursday May 28, 2026 @05:37PM (#48315873)
Ahh, sorry about that. It should be fixed in an hour, looks like we mixed the permissions. I just tried and confirmed other login methods work if you would like to try out.