| ▲ | PostgreSQL for Everything(raphaelbauer.com) |
| 98 points by karlmush 2 hours ago | 74 comments |
| |
|
| ▲ | vivzkestrel a minute ago | parent | next [-] |
| - mind coming and enligtening about PostgreSQL and XML? - https://www.reddit.com/r/PostgreSQL/comments/1vbo5j8/raw_xml... - your post did not have a single word on XML hence my comment |
|
| ▲ | HighlandSpring an hour ago | parent | prev | next [-] |
| This isn't just theory either, for example: Revolut is a bank that does all its event persistence and streaming on top of postgres. No traditional message queues/brokers in their stack. https://medium.com/revolut/recording-more-events-but-where-w... |
|
| ▲ | ethagnawl 6 minutes ago | parent | prev | next [-] |
| > Timescale lately released the pgvector extension, that turns your PostgreSQL into a vector database. I don't think this is accurate and smells like an LLM hallucination to me. From the Timescale/Tiger Data _pgvectorscale_ project's README: > pgvectorscale builds on pgvector with higher performance embedding search and cost-efficient storage for AI applications. I think this is where the confusion originates. As an aside, I've used Timescale/Tiger Data products and was very happy with them and their support. Their team was very engaged and responsive to all of our questions. They also fixed a pretty gnarly indexing bug I uncovered in pgvectorscale in an impressively short amount of time. |
|
| ▲ | replwoacause an hour ago | parent | prev | next [-] |
| I use SQLite for everything, and I'm perfectly happy with it. I'm aware of the concurrent writer issues, but at my scale it doesn't even matter. |
| |
| ▲ | zulux 26 minutes ago | parent | next [-] | | Perfectly reasonable: I'm a huge PG fan, so I start everything with it, but SQLite is sane, and it generally has a happy upgrade path to PG If you need it. | | |
| ▲ | thatwasunusual 18 minutes ago | parent [-] | | It's the other way around for me: as 99% of the stuff I develop is .NET (and I use EF Core for database stuff), I can get away with SQLite for local development, prototyping (and even staging), and then just "flip a switch" for it to run on production PostgreSQL. Both are amazing technologies. | | |
| ▲ | bpavuk 8 minutes ago | parent [-] | | EF Core is so easy to turn into a disgrace for performance, developer experience, AND build times... |
|
| |
| ▲ | joewils an hour ago | parent | prev | next [-] | | Same, I posted some corrections to Dr. Bauer's article: https://joecode.com/2026-08-19-sqlite3/ | |
| ▲ | bensyverson an hour ago | parent | prev | next [-] | | Yes, especially for a web app where there’s realistically only a need for one VM/server. By the time you outgrow that approach, a very straightforward migration to Postgres is probably the least complex problem you face. | |
| ▲ | Thaxll 12 minutes ago | parent | prev [-] | | The main issue with SQLite is the very poor type system, after testing it for an app I was shocked. |
|
|
| ▲ | devin an hour ago | parent | prev | next [-] |
| This kind of post (Postgres! It's all you need!) is getting pretty tiresome. Postgres does not even come close to a full replacement for Elastic, and that's just the first bullet. Looking down the list it is pretty easy to go: Yes, postgres can be used instead of that for extremely basic use cases, but it all goes out the window you actually need any of the power of these other tools. |
| |
| ▲ | dewey 35 minutes ago | parent | next [-] | | The point is in general for people to just consider it, often people start out on their side projects or internal company projects and commission Elastic, Redis, Postgres, Kafka before even getting started. In reality they could fit it all into Postgres for a very long time. Nobody is saying that a huge ecommerce store with complicated filtered search logic should throw away their Elasticsearch cluster and switch to Postgres. | | |
| ▲ | devin 26 minutes ago | parent [-] | | If you actually start looking into these things, you often start looking at custom pg extensions, which means you just made the decision to "simplify" your stack by maintaining your own postgres cluster with custom extensions. This is just papering over the fact that you're increasing the complexity and saying "well it's still just postgres!" as you do it. | | |
| |
| ▲ | wolttam 40 minutes ago | parent | prev | next [-] | | That's just it - most use-cases are pretty basic, and if you don’t know what you need then Postgres is probably a great place to start. If you’re just starting out, keep things simple. Otherwise, you probably already know exactly why you need something more than Postgres. | |
| ▲ | jjordan an hour ago | parent | prev | next [-] | | I'm partial to Typesense, especially for smaller data sets, since it runs primarily in memory, is easy to use and is hella fast. For bigger data sets, I hear good things about Meilisearch. | |
| ▲ | airocker 41 minutes ago | parent | prev | next [-] | | Postgres its all you need means to me(IMHO) postgres for all Olap (DB + message) , not all analytical databases. | |
| ▲ | otherme123 25 minutes ago | parent | prev | next [-] | | I have a lot of troubles with a small private instance of Rocket chat, all due to MongoDb stuff, versions, migrations and backups. I bet almost all private instances of Rocket chat would be perfectly served with Postgres. Posts like this can be tiresome, yet the general consensus among developers seems to be "yeah, Postgre/SQLite is ok for 99% of the cases, but MY case is going to be in the 1%, because I am going to be the next Facebook". | |
| ▲ | anarazel an hour ago | parent | prev | next [-] | | Fwiw, I, as someone who has worked on Postgres for a long time, also find it quite tiresome. Like there's plenty stuff I wouldn't use Postgres for, and I can probably get get more out of it than most. | |
| ▲ | onesandofgrain an hour ago | parent | prev [-] | | if you need elastic youre doing something wrong |
|
|
| ▲ | efxhoy 29 minutes ago | parent | prev | next [-] |
| Ive built data warehouses and job queues on postgres. The DW got replaced with bigquery when we started doing more tracking. We still run postgres as an app-facing cache of the aggregated data from bigquery though. The job queue runs on the cache db, scheduling jobs to move data from bigquery into postgres. It’s pretty neat. Now we’ve run into near-real-time requirements so clickhouse is getting thrown into the mix. It’s pretty funny the lengths we go to to implement user facing analytics that’s basically just “you are visitor number X” from 1995. |
|
| ▲ | shayonj 18 minutes ago | parent | prev | next [-] |
| Nice one re: flatbuffers in `blob` column. Have been working with flatbuffers a lot and that's a neat idea in general. Not 100% sure about using PG for file system at scale however. I'd love to hear more on the challenges (vacuum, toast, anything else?) |
|
| ▲ | silvestrov 28 minutes ago | parent | prev | next [-] |
| PostGIS is also another very useful addition for storing, indexing, and querying geospatial data. http://www.postgis.net |
|
| ▲ | _joel an hour ago | parent | prev | next [-] |
| No mention of https://postgis.net/ - shameful |
|
| ▲ | b-man an hour ago | parent | prev | next [-] |
| if you are searching for something similar but with more meat: https://ebellani.github.io/blog/2026/all-you-need-is-postgre... |
| |
|
| ▲ | erlich an hour ago | parent | prev | next [-] |
| It's more "what one tool can do everything", not that its ideal. Like why people use Microsoft Teams even though its terrible. The relational model and sql force us to simplify our data models too much by eliminating relationships or just not dealing with them. Think about a nested json blob from some web service api and storing it in SQL in normalized tables. No one is going to do that. Everything just becomes a denormalized mess and everything is hacked around it. Instead of modeling things in the proper way, most of the world's data is modeled in a way so that we don't have join explosions in sql queries because they look scary. Data pipelines become these scary batch transformations where data is dumped somewhere else without anyway to trace back where it came from. I encounter so many end-user applications and systems where you wonder: "why couldn't they allow a list of items here instead of a single box" or "why can't this reference this other thing". |
| |
|
| ▲ | Tsarp an hour ago | parent | prev | next [-] |
| sqlite for everything NVMe drives + Litestream + object storage(S3/R2..). sqlite simplifies things for the entire long tail of apps/services that aren't the Ubers and AirBNBs of the world. |
| |
| ▲ | skybrian 44 minutes ago | parent [-] | | It looks interesting, but deciding on where to put object storage is what keeps me from doing this. I don’t have an AWS or Cloudflare account and I’m not sure what to commit to. Also, apparently Litestream could use a filesystem instead of an object store? |
|
|
| ▲ | juancn 41 minutes ago | parent | prev | next [-] |
| As usual, it depends on the scale, but it's a sane default for 99% of use cases. Different use cases have different scalability limits in PG, when you get to them you need to deal with them. It would be perfect if it had somewhat transparent sharding, I mean a way to add another instance and distribute load without having to stop everything. There are solutions, but they tend to be involved and when you get to that point in many cases it makes sense to just move that workload to something else that scales better. |
|
| ▲ | sreekanth850 34 minutes ago | parent | prev | next [-] |
| How do you implement HA in postgres, i found MySQL HA stack pretty straight forward with Innodb cluster, MySQL router and Shell. |
|
| ▲ | vlindos 12 minutes ago | parent | prev | next [-] |
| How many production system has serious queues using PostgreSQL? |
|
| ▲ | TekMol an hour ago | parent | prev | next [-] |
| SQLite has so many advantages over PostgreSQL. No deamon. Single file per DB. Less configuration overhead. |
| |
| ▲ | BowBun an hour ago | parent | next [-] | | Postgres also has many advantages over SQLite. Supporting more than 1 writer per process. Strict typing. Access controls. Replication at scale is more effecient than copy-pasting files (seems SQLite has improved on this one). | |
| ▲ | pstuart an hour ago | parent | prev [-] | | It's probably perfect for a majority of work (and DuckDB takes that even further). But for big, multi-writer work PG is the way to go. |
|
|
| ▲ | Gluber an hour ago | parent | prev | next [-] |
| I tend to agree with quite a few points in the article, but some topics warrant some careful scrutiny. * As a message queue:
Only if your required features are very basic, like if you need cluster communication and run your own coordination protocol on top. * High Volume Time Series:
TimeScale works, but composes badly with other workloads on the same DB server ( from an operational perspective at scale ) * Vector Database:
The same issues as with TimeScale.. PgVector for example lives in its own seperate "world" and the query planner sees it as a very opaque thing. Forget about adding vector storage to an existing high volume db, that must server other complex queries.. PGVector will either trash your caches, or take over your cpu so that workloads that used to work fine stall. This is IMO not a pgvector problem itself ( Kudos to those guys ) but rather that postgresql extension apis are not very good at exposing custom costs and tradeoffs to the system as a whole. * Raw Data:
Works for small files... why anyone would want to store large amounts of data in it would be a mystery, where it shines is accessing LOTS of small files where internal caching etc help a lot compared to raw filesystem access ( also a bit dependent on the filesystem and its tuning though ) * Microservice:
If your service is ONLY exposing json data from some database model, then it should not exist at all IMO. Create a view and be done with it. |
| |
| ▲ | Gluber an hour ago | parent | next [-] | | Also to note: (Not a fault of PGVector again just a limit of our algorithmic knowledge)
PGVector does HSNW or IVFlat indices ... (there is nothing better persistent) however it breaks down with high latency at LARGE amounts of vectors ( 100MIO+ ) that seems like a high ceiling, but when designing production RAG systems, you tend to do per chunk embeddings, or even visual patch embeddings... e.g one page of a document becomes 1024 vectors in itself (for visual patch embeddings ) ... so you hit those limits at 100000 pages already.. something larger organizations definitly have. | |
| ▲ | jjice an hour ago | parent | prev [-] | | I like to consider Postgres the starting point for all of these things, that can be outgrown and replaced when appropriate. I do love just shoving everything in Postgres and seeing that I only end up needing a few additional dedicated services as the product groups. Redis is usually the next pickup for me. | | |
| ▲ | Gluber 44 minutes ago | parent [-] | | Sure, thats a good way of working.. I just have the experience when handing over a project ( consulting ) anything i have put in place will never get replaced or kept for too long outgrowing its capacity by far, and offset with huge expenses in hardware or operations. Technically not my problem anymore ( except when it breaks on a maintenance contract ) but i still like to avoid it early if i can |
|
|
|
| ▲ | ericpauley an hour ago | parent | prev | next [-] |
| Postgres is great, but I certainly don't think it's great for everything. For instance, while you can in theory implement OLAP aggregation you're going to be hand-rolling a bunch of stuff that something like Clickhouse gives you for free declaratively. |
| |
| ▲ | molf an hour ago | parent [-] | | I don't think the point is that PostgreSQL is great for everything.
But you may get by with a single piece of infrastructure instead of 7. In most of the applications we build or maintain we use PostgreSQL + cloud storage. That's it. And it works very well, also for: storing JSON, full text search, as a queue, as a vector database. Other software may be better at providing those features, but I'm extremely happy we only need to understand & manage PostgreSQL. | | |
| ▲ | ericpauley 38 minutes ago | parent [-] | | The article says verbatim “PostgreSQL Replaces Clickhouse”. Coming from storing billions of rows in Clickhouse and performing dozens of materialized operations I shudder to think about what that would look like in a DB that doesn’t even support declarative IVM. |
|
|
|
| ▲ | jppope 42 minutes ago | parent | prev | next [-] |
| I like Postgres. It is a good general purpose database. I like other databases too. Other databases can do some things that Postgres can't do as well. |
|
| ▲ | Ozzie_osman an hour ago | parent | prev | next [-] |
| I love postgres and use it heavily, but I still don't fully understand how it overlook MySQL. Maybe because of Heroku adopting it. MySQL was generally faster, and while MyISAM was a bit limited Innodb was pretty powerful, and you had the choice. It was also simpler (imo) and avoided a lot of the xid/vacuum issues. That said, still love Postgres. But at the time it started eclipsing MySQL, MySQL felt better positioned. |
| |
| ▲ | williamdclt an hour ago | parent | next [-] | | I've not interacted with mysql a whole lot, but when i did I was regularly surprised that it didn't have stuff I was missing from Postgres. Off the top of my mind: - Query planner is much worse (just yesterday I had to USE INDEX to sped up a query by 300x, I'm near-certain postgres would just have gotten it right)
- Indexes are much more limited: no GIST, no GIN
- No transactional lock (`pg_advisory_xact_lock` in postgres). This one was very surprising, it's a really useful thing and I had to implement it myself as a lock table | | |
| ▲ | atherton94027 an hour ago | parent [-] | | At least you have access to USE INDEX on MySQL. On Postgres it's not rare to have a query suddenly perform awful in production because some switch flipped in the planner and now it's picking some random index | | |
| ▲ | tux3 24 minutes ago | parent [-] | | Good news is that they just added a plan stability feature in pg19. It's actually full planner hints, so you can edit the plan to whatever you want if you have no fear, but the main motivation is exactly index stability. |
|
| |
| ▲ | _joel an hour ago | parent | prev | next [-] | | Maria, MySQL, Oracle shenannigans, perhaps. Also postgres is a "proper" db, so I'm glad it generally won out. | |
| ▲ | pandinus an hour ago | parent | prev | next [-] | | Back in the day, the sentiment was the MySQL was more-performant but the criticized tradeoff of having "cut corners". I still remember when their transaction support InnoDB table engine came out. Anyway Postgres was viewed as slower but more standards compliant - so mature architects preferred that. MySQL, in my opinion, fell into default usage among LAMP stacks and PHP-using kiddies. Postgres took the crown over time. | |
| ▲ | fabian2k an hour ago | parent | prev | next [-] | | MySQL had some problematic design decisions initially. They might be fixed now, but the impression remained. And later there was the added complication that they were bought by Oracle, so you didn't really know how this would turn out in the end. PostgreSQL also had more features back then, e.g. the JSON support is very nice if you need to do anything that doesn't neatly fit into the relational model. | |
| ▲ | bingemaker an hour ago | parent | prev | next [-] | | MySQL was a proven solution back in the day, i.e late 2000s. Github/Twitter/Heroku etc were using it. In the past 10-15 years, Postgres has come a long way. | | |
| ▲ | jeremyjh an hour ago | parent [-] | | MySQL was always behind in terms of features. In early 2000s it had very limited constraints. Most people were running in ISAM backend and did not even have transaction support. It was being used by people who did not understand how advanced relational DBs were being used. What changed is Postgres overtook its actual competition, which were Oracle, SQL Server and Sybase. MySQL caught up as well as far as I know, but it still may have some poor defaults that are widely used. | | |
| ▲ | roryirvine 42 minutes ago | parent [-] | | In the early days, PostgreSQL was so much more awkward to deal with. Crash-prone at first, and then there was the whole business around having to drop the db during upgrades. It didn't really match MySQL operationally until around 2002. During the dot com era it was common to develop and launch on MySQL with the intention of migrating to something else if they became successful (though your typical LAMP stack developer regarded Oracle and SQL Server as being deeply 'weird', so many were willing to stick with MySQL despite the well-known limitations of MyISAM). From where I'm standing, it seems that PostgreSQL became clearly preferable for new projects from the mid 2000s onwards, but it was only the Oracle acquisition that began to push existing users off MySQL. |
|
| |
| ▲ | piokoch an hour ago | parent | prev [-] | | In the times when everyone was installing Apache + PHP + "Some database" stack, the easy path was to use MySQL for a very simple reason: it had ready to use MS Windows installer. Another thing: those were times when web applications were practically 99% reads, and not so great ACID was a non-issue. Postgres is OK, but it has really a lot of quirks that are not that obvious. |
|
|
| ▲ | goosethe 2 hours ago | parent | prev | next [-] |
| yes. my people. https://github.com/seanwevans/pg_gpt2 https://github.com/seanwevans/pg_shell https://github.com/seanwevans/pg_os |
|
| ▲ | aleks_me2 32 minutes ago | parent | prev | next [-] |
| Can Partitioning be used to move data to S3 Storage, for long term archiving? |
| |
|
| ▲ | idoubtit an hour ago | parent | prev | next [-] |
| Why write a fanboy text with unfair comparisons that hide the Postgres limitations? For instance, for many simple needs MySQL is simpler than Postgres, with similar performance and consistency. * No need for a connection pool, while many use cases with Postgres require PgBouncer and Co. * Easy sort (and basic search) of multilingual text, because MySQL has case insensitive UTF8 collations. * No need to VACUUM, which can be a hard problem (it was, the last time I used Postgres). For full text search, I once worked on a project that considered several alternatives for this, including Postgres. Manticore Search was finally chosen because it was more performant, with better search results. |
| |
| ▲ | fabian2k an hour ago | parent [-] | | If you run a single application, or a few instances of the same application, you don't need an external pool and most frameworks have an internal connection pool anyway. Not sure if I'm missing anything here, but if I want case-insensitive search I simply create an index on lower(column) and use that to query. VACUUM is something you need to pay attention to at scale. And at that point you need to know your DB anyway and tune it. For smaller applications (and I don't mean only toy applications) it usually isn't an issue. | | |
| ▲ | tux3 20 minutes ago | parent [-] | | >if I want case-insensitive search I simply create an index on lower(column) and use that to query Or even pg_trgm trigram indexes, which are case-insensitive by default and support similarity search to accept typos and misspellings. |
|
|
|
| ▲ | hnrprtlpdb 2 hours ago | parent | prev | next [-] |
| The older I get the more I agree with this |
|
| ▲ | warpech 37 minutes ago | parent | prev | next [-] |
| Honorable mention - https://postgrest.org/ |
|
| ▲ | piterrro an hour ago | parent | prev | next [-] |
| true to that - currently using psql (in a single monolithic codebase) as: sql db, json db, vector store, logs store, full-text search, queue, message bus. multiple processes connected to it. |
|
| ▲ | oreally an hour ago | parent | prev | next [-] |
| isn't the process per connection restriction pretty heavyweight though? |
|
| ▲ | opengears 2 hours ago | parent | prev | next [-] |
| there is also https://postgresforeverything.com/ |
|
| ▲ | up2isomorphism 36 minutes ago | parent | prev | next [-] |
| Hardware is so far nowadays to make people with little systems knowledge confident to make such claims at least from their use cases. However it is neither generally reasonable nor efficient. |
|
| ▲ | onesandofgrain an hour ago | parent | prev | next [-] |
| the more ive coded the more this is true |
|
| ▲ | jihadjihad an hour ago | parent | prev | next [-] |
| For the graph database idea in Postgres, PG 19 has native support for property graphs [0]. You can set up your tables and their relationships as nodes/edges, then query against them using Cypher-esque [1] syntax. 0: https://www.postgresql.org/docs/19/ddl-property-graphs.html 1: https://www.postgresql.org/docs/19/queries-graph.html |
|
| ▲ | rwultsch 2 hours ago | parent | prev [-] |
| "MySQL was also potentially faster as it did not implement all features of the SQL standard. " This is a not great start. I assume it refers to MyISAM which has not been relevant for over a decade at this point. InnoDB made different design than PG decisions and was (and perhaps still is) faster at point lookups. |
| |
| ▲ | radiospiel an hour ago | parent [-] | | Well, the poster explicitly talks about 2003 here: „ In 2003, MySQL was much more widely used than PostgreSQL. MySQL was also potentially faster as it did not implement all features of the SQL standard“ | | |
| ▲ | browningstreet an hour ago | parent | next [-] | | At the time, MySQL was also the default for every PHP backed webhost provider. That's the market they lost. They're the Perl of DBs. | |
| ▲ | actionfromafar 39 minutes ago | parent | prev [-] | | Didn't very early mysql play fast and loose with the concept of actually syncing to disk? That was also fast. Web scale fast. :) |
|
|