Ask HN: What could a modern database do that PostgreSQL and MySQL can't
Lots of people are citing cutting-edge bells and whistles for advanced query plans and data types, but after working at $BIGCO and seeing what exists there (and has existed for years), I get frustrated by the lack of ergonomic and operational essentials in the public-cloud options.<p>1. Horizontal scaling. PG can do sharding or replication, but that&#x27;s not the same thing. Manual resharding is something that, once you&#x27;ve experienced it, you don&#x27;t want to do it ever again, especially when things like Spanner&#x2F;Cockroach exist. Database-level liquid sharding is such a dramatically superior solution that it makes any system that depends on an enumerated set of master instances seem completely obsolete.<p>2. Strong commit timestamps, again a la Spanner&#x2F;Cockroach. Globally-ordered commit times and read snapshots aren&#x27;t something you&#x27;ll need in every schema, but when you do, they&#x27;re magical - suddenly, you can use your OLTP system for strong lease assignment (conditioning other transactions on lease validity), you can construct arbitrary application-level transaction semantics (non-transactional read followed by transactional compare-and-swap is pretty powerful in some scenarios), and all sorts of other things.<p>3. Interface abstraction. Databases that ship language-support drivers should also ship a fake in-memory implementation for testing purposes that supports the same interfaces and options. There&#x27;s no reason why I should have to start a subprocess and emulate a network connection to tell whether a query functions properly or not, or whether I&#x27;ve set isolation properties correctly for a pipeline.<p>4. Declarative schemas, and a well-defined update process (that isn&#x27;t human-written DDL), are essential at any sort of organizational scale. Every time I see an &quot;ALTER TABLE&quot; statement checked into a repository, I tear my hair out.<p>5. Queue support, where message publishing&#x2F;consumption is transactional with other read&#x2F;write operations. You can always build a queue with a time-keyed table, but it&#x27;s kind of a pain in the ass to get all the edge cases right. It&#x27;s much better as a first-class concept supporting automatic sharding, retries, batching, and bounded-out-of-order delivery with a global cursor.