2,989 karma · joined April 4, 2019
[0] https://www.postgresql.org/message-id/flat/c22286ad6268347c6...
[0] https://www.postgresql.org/message-id/flat/c22286ad6268347c6...
[0] Write skew observed under serializable isolation: https://www.postgresql.org/message-id/flat/CA+COZaBo+ZpKgMvx...
[1] Serializable anomaly: duplicate primary keys: https://www.postgresql.org/message-id/flat/CA+COZaBOiiRPmEfX...
[2] SERIALIZABLE can commit write skew after SSI summarization: https://www.postgresql.org/message-id/flat/CA+COZaCtK=UQbeQw...
[3] Fix temporal foreign key validation of pre-existing rows https://www.postgresql.org/message-id/flat/CA+COZaChq_ukm2o7...
[4] Lost lock during toasting allows FK violation https://www.postgresql.org/message-id/flat/CA+COZaC-2-GQabq+...
[5] Partition pruning can incorrectly exclude a RANGE default partition https://www.postgresql.org/message-id/flat/CA+COZaDXrfTaBjLE...
[6] timestamp vs. timestamptz comparisons inconsistently ordered under DST : https://www.postgresql.org/message-id/flat/c22286ad6268347c6...
However, sometimes you can construct exact solutions to much larger real-world data sets (tens of thousands of points) by exploiting structure in those graphs.
(Keep in mind that pushing relational databases to 10k writes/sec is not optimal! Well before you get to that point, there are much more cost-effective options.)
On to a few other nits...
> 10k writes a second is a problem that a very small number of systems have relative to all deployed web servers, the normal case is far closer to HN.
Hmm ... I would estimate that the majority of deployed servers today use a distributed database, operating out of clusters for e.g. Google, Meta, Amazon, Netflix, Microsoft, CDN operators, and so on.
And, of course, HackerNews is also using distributed databases, so it's not a great counterexample...
> Re HN using other systems for search and api, that’s more related to supporting companies the vc funded - Algolia
HN uses Google BigQuery to support a company they VC funded? Anyway, this is "no true Scotsman"-ing databases.
I think this dynamic also requires more data engineers, but I don't personally see the split in demand between those roles that you describe. Data analysts often have business or domain context that data engineers lack.
Perhaps we'll start rolling data analysis work into "operations".
However, relational databases are a poor fit for writing logs, for performing analytical queries, and various other purposes that most reasonably large businesses today need. You can try to use your relational DB for them, but you will create real performance issues very fast; and even if you can get the DB to scale up for the load, you'll end up paying way more money that you would from using the right kind of DB for that workload.
As far as relational databases go, another common workload they're a bad fit for is analytical queries. If you employ any data analysts or operations staff, they can bring even the biggest deployment of Postgres/MySQL to its knees pretty fast with relatively simple queries. Read replicas buy you a little runway there, but they're just not a good or cost-effective way to power BI workloads.
> To take one example this high traffic website (HN) uses one db
First of all, HN does not use a single database! E.g. it powers search with Algolia and API queries via Big Query, and that's just for external traffic.
Second, HN is not a high (write) traffic website. It's a forum. We can actually see from those serial IDs that there are about ~50 million all time comments. HN is about 20 years old; that works out to about 5 writes per minute. Of course growth has increased over time, but it's still probably less than 1 write per second.
So, I'd agree with you that lots of interesting websites can power their primary application write traffic with a traditional relational database, but I think you'll find that those properties end up needing several other databases anyway for other purposes.
In other words, it depends. And it might not matter at all if you don't have much data, and/or it's not being generated in a distributed way, and/or you're not doing range queries or partitions in a way that can take advantage of it.
It looks like Citus (one such extension that runs shards on separate workers) does something a little like what you described. Each node gets an ID, which becomes the high bits of the sequences it generates. So serial IDs are monotonic within a shard, but not across shards.
Aurora PostgreSQL Limitless uses different abstractions, but also ends up reserving different chunks of IDs for different routers to use.
Of course, lot of event/log data never hits a relational database at a all.. it gets piped right to a data lake. But those records still need IDs, too.
Many years ago, I was working at a small shop that used Oracle databases. We had different tenants for different customers. However, we still wanted records across different tenants to have unique IDs, so (as I recall) all writes to all tenants phoned out to a central sequence generating function. This became a major source of latency for us. This is jut one of many ways that serial IDs become annoying if you're doing anything other than running a 1990's-style RBDMS on a single server.
Anyway, once you try to solve this problem, there are lots of schemes that give you (almost certainly) unique IDs without coordination. Whether you pick UUIDv4 or v7 etc.etc depends on other factors. But one nice feature of UUIDv7 is that it is kinda, sorta serial, which is helpful for e.g. partitioning to work well.
> What we demonstrated > Pre-authentication RCE on WordPress, Drupal and Joomla
However, I don't think this article is really complaining about style. Scott Alexander has great style, the clarity/grace people would find much to love about him.
The complaint is about the length of his writing, and the content, ie focusing on endless arguments as opposed to honoring prior traditions.
I think that when references to the prior work are only implicit, pieces tend to be nearly unreadable for casual readers.
However, when interesting counter arguments are stated explicitly, the long articles can still be kind of fun, and personally think this is something Scott Alexander does pretty well, for instance. He is not the main offender of unreadable long rationalist blog posts, of which there are many.
When I was younger, sometimes I would just get carried away by the splendor and awe of it all and soak in the 25,000 word articles (or whatever they are.)
Today I would say that either he has fallen off a little, or I've just grown a little weary of the form, but I don't really get the same rush out of his writing anymore; and I notice more of the motivated reasoning and cheap tricks.
Still, sometimes I'll come across one of his posts and think 'damn, Scott's still got it.'
Many people also use tradition as a cover for bias, bigotry, and bullying. When one has been on the other end of that, one learns to view blind tradition with a healthy dose of skepticism.
And yet, still, there is much of value there. Ironically it takes some wisdom to learn which is worth keeping and which is not.