If you were paying attention, postgres always the better option, based on my experience starting around 2002 or so. MySQL had the better marketing in its name and was arguably a bit easier to get going from the start, but postgres was always more advanced and IMHO once you got past the most basic usage made a lot more sense in how it's configured.
The fact that it was the M in the LAMP stack gave it a huge edge too. What was at one point an all day, if not multiday setup and configuration process became a simple install script once LAMP became a thing.
MySql was the "default" for a long time until Oracle muddied the waters just enough to make devs look around a bit.
So you had startups which created their MVP on some shared webhost, which had MySQL and nearly non had pg. as those startups graduated into enterprise fame, they never left MySQL but instead fixed its problems along the way.
The mysql replication story was the big thing for me in the early/mid 2000s. Back then postgres replication seemed like every option was a brittle/incomplete 3rd party hack with different sets of tradeoffs.
Postgres also had a reputation for being correct but slower. The perf differential disappeared a) as postgres got faster and b) mysql got more reliable/robust.
> Postgres also had a reputation for being correct but slower
Even back then, I found that mysql was faster for “select * from table where primary_key = 42”, but with even the slightest complication (joins, functional queries, subqueries), postgres pulled ahead.
I guess a huge percentage of SQL queries are really just key-value lookups though, so I can’t blame people for using mysql too much (this was before memcached, let alone redis et al)
Setting up multi-master replication with automatic failover was easy with MySQL a very very long time ago. Yes, there were foot guns (MySQL let you do some extremely stupid things). Yes, you really had to have a decent grasp of how things worked under the hood to not lose transactions, and your metrics / logs / alerts story had to be good, and your ops staff needed to know what they were doing during an incident. But that's always the case when self-hosting databases. We looked at Postgres several times over a 5 that period, and it always felt seriously lacking to me as an operator (not a real DBA or developer).
Galera kinda improved the MYSQL replication story for certain specific use cases, at the expense of (a lot of) extra complexity and way more foot-guns. I couldn't recommend galera even when the use case matches up. It took us years to get it operating relatively safely, and that was after a heap of near-misses with customer data. (Yeah, a bunch of us thought it was folly to use it but we weren't decision makers at the time)
I don't remember it like that. I think even php2 had support for more databases. One I am sure it supported was mSQL. I think they always had ms sql and oracle too. They were after all always very quick to provide bindings for anything with a C library. One of the reasons for php syntax being all over the place is because they tried to keep the C semantics for any given library.
Perhaps what you are remembering is a particular OS or installer's packaging.
It’s the same story as people building databases in Excel, while it’s small you want to look away from all the details so you choose a tool that doesn’t get in your way. Then when it grows and becomes unwieldy it’s difficult to migrate away because the data is a big mess and there is no model.
Postgres has the safety of the data as its utmost goal, while people will just rename genes because Excel automatically misinterprets them as dates.
I don’t agree. WAL/replication was complete junk for a long time. Not to mention needing stuff like pgpool and pgbouncer in more complicated deployments.
The fact that it was the M in the LAMP stack gave it a huge edge too. What was at one point an all day, if not multiday setup and configuration process became a simple install script once LAMP became a thing.
MySql was the "default" for a long time until Oracle muddied the waters just enough to make devs look around a bit.