When did Postgres become cool?
crunchydata.com
crunchydata.com
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.
- 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.
PostgreSQL was more esoteric and lots of stuff wouldn’t directly support it or would only do so half heartedly.
So MySQL took off. But people programming against a database would lean towards pSQL.
Perhaps what you are remembering is a particular OS or installer's packaging.
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.
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.
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)
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)
Postgres has the safety of the data as its utmost goal, while people will just rename genes because Excel automatically misinterprets them as dates.
https://www.youtube.com/watch?v=b2F-DItXtZs
Edit: what happened to highscalability.com?
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.
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.
I love not having to be trivia king.
These days even on my "underpowered" NAS I can just run a default docker image of my database and not worry about tweaking anything.
For a time, MariaDB was the new option, but its commitment to binary compatibility with MySQL made it feel bogged down.
Fun fact: Julian Assange contributed code to PostgreSQL a long time ago: https://news.ycombinator.com/item?id=18464671
As a MySQL DBA for the past 20 years it was practically the only choice until Oracle bought Sun, then it was instantly radioactive. A shame because the fears people had were unfounded and some of the best development work has been done since then.
...and that doesn't even account for differences in global variables/configuration, SQL syntax, functions, replication, etc.
https://www.postgresql.org/about/news/postgresql-92-released...
https://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_...
What made postgres "cool" for me was the realisation that you get more than what you bargain for:
> More than "just a database", it's a data platform
This feeling of being also relevant for the evolving world of data engineerimg comes from noSQL functionality like JSON support and also extensions that allow graph operations.
So postgres is cool because it is a reliable workhorse that wont let you down but its codebase and community have also the DNA of a racehorse that can win an occasional race for you.
What else can you ask of a horse? :-)
So I would say it was already "cool" at that point (albeit not in wide use, at least in my circles).
We weren't too happy with Oracle (pricing), and we'd only moved to that after being unhappy with MySQL in 2000 (no transactions!). I think PostgreSQL would have been a good choice for us, and I did give it a try, but migrating all the data out of Oracle just didn't really seem possible (Oracle didn't provide great export tools as you can imagine, and a "SELECT col1 || "," || col2 .." type of thing to produce a CSV would have taken hours per table and we had a few dozen tables, so would have either resulted in days of downtime, or some funky logic with a lookup table to say which database a user was in and moving them over one-by-one, but then what about FKs? what about a "messages" table where one user sends a message to another? etc. So on Oracle we stayed until the end of the product around 2012.
Edit: I also think emoji becoming popular was a huge win for Postgres. Emoji didn't work in MySQL because "utf8" wasn't actually UTF-8 and "utf8mb4" made indexes super limited for dumb reasons. As people started realizing this, it hurt MySQL's reputation pretty badly and a lot of folks avoided it for new projects.
https://dev.mysql.com/doc/refman/8.0/en/charset-unicode-utf8...
The "mb4" stands for "multi byte 4".
No, stock MySQL has never used a default character set of utf8 (utf8mb3). Prior to MySQL 8, the default character set was latin1, not utf8 (utf8m3).
"utf8" being utf8mb3 is indeed a huge foot-gun, but it isn't correct to say that "Unicode was broken by default in MySQL". utf8mb4 has been available for use since 2010 (MySQL 5.5).
As for silent truncation, that bad default was fixed in 2015 (MySQL 5.7), but the option has been available since like 2004 or 2005.
That all said, some Linux distros may apply some non-standard defaults (like changing the default charset), and ditto for cloud DBaaS products (e.g. RDS disables strict sql_mode even today in all versions).
That actually depends on whether your application actually relies on collation behaviors for case insensitivity or accent insensitivity of non-Latin characters.
From experience I can tell you that some of the largest companies in the world actually store unicode in MySQL tables using latin1 character set! It's not ideal and it's conceptually very gross. But in practice it actually works completely fine for these companies, because the relevant collation logic is handled in the application and/or in ancillary services.
Anyway, I agree with your overall point that MySQL should have changed the "utf8" alias to point to utf8mb4 much much earlier. Although I also understand the significant backwards-compatibility concerns (especially regarding logical dumps) which forced MySQL/Sun/Oracle to slow-walk this change.
Interesting view with cloud vendors, there does seem to be a shift from traditional LAMP stack.
Cygwin and busybox performance is awful in code that calls fork() often, but I understand that WSL1 behavior is very different, because fork() isn't fighting through layers of Windows.
The reason that the POSIX layer exists in NT is that Microsoft was the largest UNIX vendor in the early 80s with their XENIX variant, where the largest market segment ran on the TRS-80 Model 2 (68k-based, 3 simultaneous users, two attached rs-232 terminals).
"Broad software compatibility was initially achieved with support for several API "personalities", including Windows API, POSIX, and OS/2 APIs – the latter two were phased out starting with Windows XP."
My mental model is that they shed any UNIX business to focus on Windows, but then POSIX happened and they had to provide something in the market to meet the requirement.
https://en.m.wikipedia.org/wiki/Windows_Services_for_UNIX
https://m.slashdot.org/story/16351
In any case, a "userspace personality" such as NT exhibits is not added quickly. The NT design began in the late 80's, and I think that something like a POSIX layer existed from the beginning.
The Wikipedia page agrees that it was included from the beginning to satisfy government requirements - https://en.m.wikipedia.org/wiki/Microsoft_POSIX_subsystem
Postgresql will become cool once they start thinking on operators - they still lack simple `show slave status\G` statements for quick checking replication status. Googling everytime for the WTH of tables needs to be queried.
Has been since before the Maria/MySQL split in my sphere of the world. Always interesting to see how different people perceive tools over time.
Honestly this sounds more like "When did psql go mainstream"?
Way more Rails apps used MySQL or other databases, it was largely Heroku winning Rails that led to the strong adoption amongst that community.
One of the huge benefits I see with Postgres is its extension system. PostGIS is amazing. Can save any company that needs to do heavy geospatial processing $$$ by dodging ESRI. The only database I've found that handles geospatial stuff better is BigQuery, but considering the revolution that was Google Maps over the best decade I don't think that would really surprise anyone.
Now were we cool? I have my doubts. We sure thought pgsql was cool though (still do!)
Like everything with MySQL, there were and are endless gotchas. Once you learn most of them it’s incredibly performant (and ProxySQL in front of it is amazing, and has way more capabilities than just connection pooling), but it’s definitely full of footguns.
https://www.slideshare.net/pgconf/elephant-roads-a-tour-of-p...
It doesn't need an expensive website or loads of devrel or non-grassroots event management - those are what you do to simulate success until maybe you make it. It needs smart people over a long period of time.
When I looped back around several years later Postgres had started to overcome MySQL. Conventional wisdom then was it was roughly at feature parity with MySQL but more robust.
So it would seem that working on having a robust inner core first paid off, even if it cost some early reputation.
MySQL developers peeking over the fence at Postgres realized their database lagged way behind Postgres when it came to transactional DDL statements, window functions, basically most modern SQL stuff. MySQL was just sloppy from a developer's perspective... weird nonstandard SQL RDBMS behavior in places.
I've heard that MySQL has made nice strides in recent years. Cool, I guess. Not really trying to tie my future to Oracle.
I later continued using Postgres in my career after having done quite a variety of benchmarks and came to the conclusion that it, in general, scaled more linearly across additional CPUs than MySQL's InnoDB engine did at the time.
[0] PostgreSQL License: https://www.postgresql.org/about/licence/
I thought it was very cool doing fancy joins and reliable procedures but then came the NoSQL era and I nearly forgot about it. Then everyone started to realize that any growing database ends up with complicated relations and lots of applications do not fit non-relational data structures well. Suddenly postgres came up with the json and jsonb types. It was like a fairytale.
So when did it became cool? Around 2016/2017. Why? Good technical decisions and execution.
It's that moment just before something becomes uncool, lol.
Software developers are glorified teenagers. Once something goes from upstart to widely used, developers get bored with it or else frustrated with the issues that arise from actual professional use. Then they go looking for the next fashionable upstart.
Oddly, I feel like PostgreSQL is on it's second cycle through this loop now.
Strange how people seems to have forgotten that.
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.
i just love mysql's hackable storage engine (particularly the new lsmt engines), and i hate toast so much, not to mention the permission system which is so convoluted and it is so easy to shoot yourself in the foot. and of course it does not play nice with low iops ebs.
its too expensive to migrate from pg now, but i would avoid it in the future
i usually dont use super sophisticated sql, so mysql is actually pretty good for me considering i can tune the knobs on some tables pretty well.
nothing against postgres, i just think its a bit overhyped and its also harder to squeeze it in the cloud's ridiculous iops prices
https://www.postgresql.org/docs/7.0/release.htm vs https://www.postgresql.org/docs/9.0/release-9-0.html which added full windows support.
It was a good tool, and it still is. There is no marketing, no fluff, no buzz world.
It gets the job done.
That's what's good about it.
https://blogs.vmware.com/apps/2017/06/oracle-vmware-vsphere-...
I have seen cases where it made sense to run regularly scheduled vacuums outside of just leaving it all to autovacuum, but in my experience this is rare - when I see someone worrying about vacuums it's usually the case that they should just change an autovacuum knob and then forget about it.
Here's a recent HN submission about OrioleDB of the more promising ones: https://news.ycombinator.com/item?id=36740921
Source code: https://github.com/orioledb/orioledb
That doesn't seem correct. Wasn't PostgreSQL Inc. the first PostgreSQL company?
Use all the relational stuff but still have nice native support for JSON and useful extensions.
What else do I need?
Even now, with the addition of vector stores we get PGVector and so it just reinforces my choice over time.
So ca 2010, maybe just a little earlier?
99% of the time i'm using a sql database it's because i don't care about cool features tho. i mean window functions and json and recursive ctes are definitely cool but my orm isn't gonna use them
the startup got bought out a couple years later, so i guess it was successful, but my options were so diluted they weren't worth much
the huge difference in my experience was going from no credible gratis sql rdbms in 01993 or so, to msql in 01994 (gratis but far from libre), to mysql in 01996 (gratis but not quite libre) and postgresql (libre!) in the fuzzy period 01996–02000. postgres didn't support sql until 01996 but for reasons i don't remember wasn't really a viable alternative to mysql until about 01999. i don't remember exactly when mysql started offering a real free-software license but i think it was maybe 02000 or 02001; the lawsuit over nusphere's infringement of mysql's gpl was 02002
maybe gumby can weigh in with his experience trying to sell people on an enhanced postgres fork supporting cross-data-center oltp at zembu (eventual-consistency-like multisite performance but without the eventual consistency, which is to say, inconsistency). other founders were ncm and ian (lance) taylor: http://web.archive.org/web/20010617143323/http://www.zembu.c...
nowadays i think sqlite is kind of the big competitor; lower write performance, higher read performance (except for very complex queries where its simple execution model is inadequate), and much lower hassle
probably all these non-column-store designs are obsolete; i'm curious whether there's a column-based sql database that offers the same degree of hassle-freeness as sqlite or even postgres
Upgrading is still too much of a pain though
MariaDB.
On the other hand, I've worked with MySQL a few times in the same period, mostly because Oracle, whatever its failings, has kept MySQL alive. Not thriving, but alive. I'm so glad they didn't buy PostgreSQL.
I was there too when Oracle took over and everbody knew what was going to happen.
Happy also that pgsql was not a victim and is still alive!
Back in 2006, the startup I was with moved from PostgreSQL to MySQL because the support we were able to find was both expensive (300 USD/hr) and not satisfactory. Back then MySQL AB (this was before Sun) gave us a 10K two year deal on three servers and they had excellent response times and knowledgeable support.
For PostgreSQL the year 2010 when Salesforce bought Heroku (big plus) and Oracle bought MySQL (big minus for MySQL so indirect big plus to PostgreSQL) was the breakthrough, I would say.
That MySQL didn't get CTE and window functions until 2018 is a sad joke.
That's still the case.
In particular, MySQL is faster for updates (no MVCC), but that comes at a cost that I would be hesitant to pay.
I was explaining that not all of his non-aggregated columns were in his group by, so his query wasn't going to work.... but what do you know, MySQL will just return whatever it feels like from the group in that situation. I expected it not to run at all.
I think there are some flags etc you can use to enable to stricter behavior but it was one of the wildest footguns I've ever seen.
For my use case, JSONB support completely killed most NoSQL solutions.
Saying that, SQL databases are still the king by a wide margin. Postgres has grown more at other SQL DBs expense than anything.
Indeed. I was surprised to find that search volume is about as high as it has ever been: https://trends.google.com/trends/explore?date=all&q=nosql&hl...
Hahaha, a thing that is cool and emerges from millions of dollars of VC funding. Hahahaha
Anyone with experience of MSSQL and PostgreSQL who'd like to comment on how it they compare?
However IMHO MySQL still wins in operational efficiency and performance. These are things that only start to matter when you scale your database and most people never actually reach those sizes.
maybe we were mistaken, but lets say the picture was still fuzzy
Asking because it's not supposed to be troublesome. In theory (!), minor version upgrades don't require any change to the on-disk data, so you should be able to just upgrade your PG binaries then restart the database.
In any case it's way more straightforward with mysql.
https://hub.docker.com/r/pgautoupgrade/pgautoupgrade
---
That being said, those pgautoupgrade images are alpine Linux based.
People coming from non-alpine Linux images of PostgreSQL will probably need that older not-automatic approach you linked to.