Live data from Hacker News

When did Postgres become cool?

crunchydata.com

151–160 of 182 posts

Re: When did Postgres become cool?

#151

I run Postgres since about 2016. I used to run MySQL behind the same frontend app. I barely know anything about Postgres beyond installation for our use case, backup and recover. I used to know loads about obscure MySQL optimization techniques, fixing broken tables, fiddling with scary parameters and recovering from hair raising situations. I like my current state of ignorance.

Isn't that just more about the abundance of hardware we have these days? While on the MySQL side you had to delve into tweaking the different cache sizes and picking MyISAM or InnoDB depending on the use case, on Postgres you had to deal with stuff like manually running VACUUM at the right time or later when that arrived tweaking the autovacuum params. These days even on my "underpowered" NAS I can just run a default…

Picking MyISAM or InnoDB was a programming, not admin decision. The answer was almost always InnoDB.

Re: When did Postgres become cool?

#152

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.…

In the early 2000s, MySQL was: - way easier to install - way easier to maintain (not vacuuming, etc) - and had a replication story. 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.

MySQL was cool then Oracle ____ it.

Re: When did Postgres become cool?

#153
post #129

Earlier quoted context omitted.

In the early 2000s, MySQL was: - way easier to install - way easier to maintain (not vacuuming, etc) - and had a replication story. 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.

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)

Re: When did Postgres become cool?

#154

Earlier quoted context omitted.

Yeah, and MySQL was popular among PHP developers, remember LAMP installers?

IIRC, in the PHP3 / PHP4 days, the only database binding available in out-of-the-box PHP was MySQL.

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.

Re: When did Postgres become cool?

#155
post #154

Earlier quoted context omitted.

IIRC, in the PHP3 / PHP4 days, the only database binding available in out-of-the-box PHP was MySQL.

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…

You're right, it's there in PHP 2. https://web.archive.org/web/20000815061332/http://www.php.ne...

I think I'm remembering the Win32 binaries. At https://museum.php.net/win32/ the PHP3 binaries only have MySQL.

Shared hosts settling on MySQL probably made the difference.

Re: When did Postgres become cool?

#156

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.…

But MongoDB is webscale. https://www.youtube.com/watch?v=b2F-DItXtZs Edit: what happened to highscalability.com?

It died a few years ago. Now it's all ads.

Re: When did Postgres become cool?

#157

The only correct answer to this question is 2012-09-10, the PostgreSQL 9.2 release date. In that release they unveiled JSON datatypes, and developers were able to have their cake and eat it too. https://www.postgresql.org/about/news/postgresql-92-released... https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_...

I think CTEs and window functions in version 8 were big, combined with udf you could write some very complicated queries for data analysis without exponentially growing number of joins.

Re: When did Postgres become cool?

#158
post #129

Earlier quoted context omitted.

In the early 2000s, MySQL was: - way easier to install - way easier to maintain (not vacuuming, etc) - and had a replication story. 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)

Re: When did Postgres become cool?

#159
I think Heroku played less than a role than it sounds like. Sure, they offered it for Rails, but working with Rails especially back then a typical Rails application made very little use of any of the features.

It typically was and to a degree still is tables rather than arrays, application defined integers instead of Postgres Enums, in general very little user defined types, Rail's validation system instead of Postgres constraints (even automatic querying for duplicates).

Sure it might have made people hear about Postgres, but I think few people using ORMs really could tell you anything about any of all the amazing features that Postgres has. I think Arrays might be the main one.

Re: When did Postgres become cool?

#160
post #36

I run Postgres since about 2016. I used to run MySQL behind the same frontend app. I barely know anything about Postgres beyond installation for our use case, backup and recover. I used to know loads about obscure MySQL optimization techniques, fixing broken tables, fiddling with scary parameters and recovering from hair raising situations. I like my current state of ignorance.

Running Postgres in production since 2017. Some trivia required, but nothing like priest knowledge needed for MySQL. I love not having to be trivia king.

What kinds of things do you need to do for MySQL? I’ve always run postgres, that is why I ask.
Post reply on HN