by latch · 4y ago · 0 comments
> ...This log architecture is optimized for raft consensus-based replication allowing the implementation of active-active multimaster.
I'm a developer but manage 2 PostgreSQL instances each with an async replica. I also manage 1 three-node CockroachDB cluster. It's night and day when it comes to any type of ops (e.g. upgrading a version). There's a lot of reasons to use PostgreSQL (e.g. stored procedures, extensions, ...), but if none of those apply to you, CockroachDB is a better default.
I just finished interviewing someone who went into detail about the difficulty they're having doing a large scale migration or a mission critical large PG cluster (from one DC to another)..it's a multi-team, year long initiative that no one is comfortable about.
In my experience, PG is always the most out-of-date piece of any system. I still see 9.6 here and there, which is now EOL.
The design document will be published later.
Operationally? Mysql. I pick MySQL 8 whenever I can because over the lifetime of a project it's easier.
Pragmatically I'm coming to the uncomfortable (as a Foss advocate) idea that Microsoft SQL Server is a good choice and worth paying for. Features and relative ease of use.
- Forwards (and usually also backwards) compatible disk format, meaning version updates don't require more than a few minutes of downtime. On large datasets, postgresql can require days or weeks.
- Replication works across version differences, making upgrades without any downtime at all easier.
- No need for a vacuum process that can run into trouble with a sustained high write load.
- Page-level compression, reducing storage needs for some types of data quite a bit.
- Clustered primary keys. Without these, some types of queries can become rather slow when your table doesn't fit in memory. (Example: a chat log containing many billions of messages, which you're querying by conversion-id.)
- xtrabackup (innobackupex) is awesome.
MySQL has a similar mechanism called the purge job. It can lead to similar problems, for example DML slow down.
How so? Postgres' data formats are forwards (and mostly backwards) compatible with release 8.4 in 2009; where effectively only the catalogs need upgrading. Sure, that can be a lot of data, but no different from MySQL or any other RDBMS with transactional DDL.
> - Replication works across version differences
Logical replecation is available since at least 9.6
https://use-the-index-luke.com/blog/2014-01/unreasonable-def...
Postgres has logical replication these days, which can be used to achieve this
Though it scales horizontally, you will need to throw at least 10x or more hardware at it to achieve the same throughput
I don’t have a like for like benchmark, but at least for writes - we’re running with 5 replicas of each range so that’s 5x the disk write i/o just from that.
Add in some network overhead and running raft etc, and you are going to be needing a lot more resources than for PG to maintain a similar throughput - but adding resources when you can scale horizontally is so much easier that the tradeoff is worth it in my experience.
Yes