News for hackers. Stuff that matters.
Re:The Great Migration from MongoDB to PostgreSQL by renegade-otter on Friday March 29, 2024 @05:16AM (#39862018)
I am not calling Postgres hype - it should have never been NOT hype. It's a reasonable default for most problems,

Now all I read about is how Postgres is awesome, as if it's this great new thing. I guess that makes sense, as the new generation of engineers is rediscovering stable, reliable, lean technologies after a decade of excesses with "exotic" tech.

For grey beards, it's all very odd. Like, "where have you all been?"

Re:The Great Migration from MongoDB to PostgreSQL by arp242 on Friday March 29, 2024 @06:12AM (#39862350)
I remember Robert C. Martin ("Uncle Bob") going on about how No-SQL will replace literally all SQL and that there is literally not a single use case for relational data and SQL. I wonder if he ever came back on that.

Now, my opinion of Martin in general is not especially high and he's a bit of a controversial figure, but it wasn't just the kids. And Martin is also all about reliable software, so that makes it even more surprising.

Re:The Great Migration from MongoDB to PostgreSQL by rjbwork on Friday March 29, 2024 @06:50AM (#39862552)
He's always been fundamentally a salesman. Hopping on the hype trains lets him sell more.
Re:The Great Migration from MongoDB to PostgreSQL by pydry on Friday March 29, 2024 @07:23AM (#39862736)
He's always been fundamentally a zealot who sees most narratives in black and white terms. It's an extremely unfortunate characteristic of a software engineer.

It's the same reason he's so pro Trump I think.

Re:The Great Migration from MongoDB to PostgreSQL by wesselbindt on Friday March 29, 2024 @08:04AM (#39863016)
The reason he says he voted for Trump is taxes. But that seems like a pretty flimsy reason. Have dems in the past couple decades ever reverted any republican-instated tax cuts for the wealthy/corporations, or even made any moves for tax bumps? In my experience dems are just republicans, except they wave a rainbow flag every now and then.
Re:The Great Migration from MongoDB to PostgreSQL by arp242 on Friday March 29, 2024 @11:38AM (#39865373)
I didn't even know about that; I checked his Twitter, and first thing is a reply to the Baltimore bridge collapse:

> Doors and wheels fall off airplanes. Hundreds of illegal immigrants assault and overrun border guards in Texas. We can’t even muster support for our allies in the security council. But at least our pronouns are in order.

https://twitter.com/unclebobmartin/status/177262869295654553...

You really need to be a special sort of individual to go from a collapsed bridge to ranting about pronouns with no prompting or any prior mention of that. What a complete spanner.

Re:The Great Migration from MongoDB to PostgreSQL by forgotmyinfo on Friday March 29, 2024 @11:52AM (#39865530)
That happened to esr, too, although he derailed right after 9/11, and it's been downhill ever since.
Re:The Great Migration from MongoDB to PostgreSQL by zo1 on Friday March 29, 2024 @01:00PM (#39866332)
From the other side, people like me, see your odd dismissive behaviour in the same light. This bridge and hundreds of other things going wrong throughout the world atm are all symptoms of some sort of rotten problem, and I honestly don't know why you guys are so adamant about dismissing it. Almost as if you want to see it all come crashing down.

Pure evil, as Trump would call it.

Re:The Great Migration from MongoDB to PostgreSQL by arp242 on Friday March 29, 2024 @01:14PM (#39866498)
Yes, a single accident of the type that's been happing sine bridges were invented, pronouns, and unconditional support for an out of control government in Israel are all deeply related...

Or he's a hyper-politicized idiot completely consumed and obsessed by some topics and needs to talk about them all the fucking time at the drop of a hat, whether appropriate or not.

It has nothing to do with "sides"; it has to do with the forceful injection of completely unrelated matters.

Re:The Great Migration from MongoDB to PostgreSQL by rjbwork on Friday March 29, 2024 @02:16PM (#39867246)
>of some sort of rotten problem

Agree. Out of control neo-feudal lords taking up all the slack out of every system they can get their tendrils into in the name of efficiency, thus endangering us all in order to extract as much profit as possible out of our entire economic system.

The "other side"'s solution tends to be to further deregulate industry and the economy, and to empower and lower the tax burden of these neo-feudal lords, all while pointing at gays, trans-folk, and immigrants as if they are the reason people can't afford rent and bridges are falling down.

Re:The Great Migration from MongoDB to PostgreSQL by renegade-otter on Friday March 29, 2024 @02:30PM (#39867414)
Another man opens the morning newspaper, and after scanning the headline, declares: "Honey, this planet is going to hell".
Re:The Great Migration from MongoDB to PostgreSQL by jimbokun on Friday March 29, 2024 @02:10PM (#39867186)
Is the rate of these incidents increasing, decreasing, or about the same?
Re:The Great Migration from MongoDB to PostgreSQL by zo1 on Friday March 29, 2024 @03:18PM (#39867914)
Obviously you can say I'm biased but I think they're increasing.
Re:The Great Migration from MongoDB to PostgreSQL by pydry on Saturday March 30, 2024 @06:40AM (#39873554)
>From the other side, people like me, see your odd dismissive behaviour in the same light. This bridge and hundreds of other things going wrong throughout the world atm are all symptoms of some sort of rotten problem

Just one problem, huh?

This illustrates what I meant about black and white thinking.

Re:The Great Migration from MongoDB to PostgreSQL by zo1 on Saturday March 30, 2024 @07:31AM (#39873846)
Not sure what angle you're going with. If you want to say there that there is more than one rotten problem at the core of society, go for it. I'd be the first to agree with you.

This is not black and white reasoning. Each problem can be on a continuous plane, from "slightly bothersome" to "there is an absolutely horrible evil lurking here".

Re:The Great Migration from MongoDB to PostgreSQL by belter on Friday March 29, 2024 @08:30AM (#39863265)
I also remember Michael Stonebraker basically saying something, but being ignored...Along the lines of "I will see you all map reduce and nosql people in 20 years, after you have all reinvented SQL...."

Not an actual quote but a factual statement

Re:The Great Migration from MongoDB to PostgreSQL by jimbokun on Friday March 29, 2024 @02:08PM (#39867167)
Because he realized you can parse SQL and generate the equivalent of a map reduce job on the backend to execute it.
Re:The Great Migration from MongoDB to PostgreSQL by GiorgioG on Friday March 29, 2024 @09:14AM (#39863718)
Unpopular opinion, Robert C Martin has caused more harm than good. People take his ideas and blindly follow them no matter the cost. I’m looking at you clean architecture.
Re:The Great Migration from MongoDB to PostgreSQL by forgotmyinfo on Friday March 29, 2024 @11:51AM (#39865515)
Well yeah, solving problems and thinking critically and learning are hard and boring. "Uncle Bob" gives you handy alhorisms you can spam on your next pull request and then feel like you've done something.
Re:The Great Migration from MongoDB to PostgreSQL by arcbyte on Friday March 29, 2024 @11:53AM (#39865547)
There's definitely a missing piece he hasn't explained well enough. I've seen the best code in the world because it was clean architecture and I've also seen some truly atrocious code in the style of "clean architecture".

To me the difference was in recognizing that the architecture advice is implicit - its not actually written down in the code, rather the code exemplifies it - and the business domain is explicitly modeled. When developers name everything "use case" and "interactor" and go crazy with packages and folder structures with architectural names it's a recipe for terribleness.

Re:The Great Migration from MongoDB to PostgreSQL by Shorel on Friday March 29, 2024 @11:29AM (#39865267)
His words: "I am also self-taught. I never got a degree of any kind. I entered the industry at the tender age of 17 and never looked back. Frankly, school isn’t all it’s cracked up to be — especially in the software field."

https://twitter.com/unclebobmartin/status/107212575854868889...

Which means his opinions are more often than not uninformed opinions and should be taken with a grain of salt.

Re:The Great Migration from MongoDB to PostgreSQL by fijiaarone on Friday March 29, 2024 @09:14PM (#39870887)
When you turn 23 in a couple years, you’ll look back at college and realize you weren’t at the apex of all knowledge back then.
Re:The Great Migration from MongoDB to PostgreSQL by sph on Saturday March 30, 2024 @03:10AM (#39872545)
I think you overestimate college education a little too much. Having a degree doesn't make your opinions automatically better than those that didn't have the chance to get one. You wish it did, but it don't.
Re:The Great Migration from MongoDB to PostgreSQL by Shorel on Friday April 05, 2024 @12:26AM (#39938680)
My remark is not about the quality of college education. It's about his mindset.

You don't need a college education to read research articles, books and journals. But you certainly need an open mind and some discipline to not try to reinvent the wheel all the time. You need to learn about the state of the art in your field.

Some ideas and algorithms are proven and battle tested, and people should learn about them, before trying to create something new and claim it is much better than the old thing. This is very noticeable in some fields like cryptography.

His modus operandi certainly seems to be on the other extreme, everything old is bad and the new thing around the corner is going to change everything. Which causes a lot of people who believe him to collectively waste millions of hours of their time.

About your comments on the degree... it really depends on how you got it. For most people, I would agree with you. A small group of people in academia are insanely smart and are focused on research.

Re:The Great Migration from MongoDB to PostgreSQL by forgotmyinfo on Friday March 29, 2024 @11:49AM (#39865505)
That's as ridiculous as saying "integer division will be useless in 20 years". Sometimes relational databases really are the optimal solution to certain problems. I really wish CS had better authority figures, although we shouldn't need them in the first place.
Re:The Great Migration from MongoDB to PostgreSQL by sph on Friday March 29, 2024 @06:20AM (#39862401)
Excited, vocal users make the most noise.

Somehow the entire Mongo DB era passed me through and I never used it once. I used to use MySQL in the 2000s, and switched to PostgreSQL in the 2010s.

Re:The Great Migration from MongoDB to PostgreSQL by benterix on Friday March 29, 2024 @09:42AM (#39864020)
You haven't missed much TBH. I think the only case where you'd use it in new projects in DynamoDB if you work with AWS.
Re:The Great Migration from MongoDB to PostgreSQL by finikytou on Friday March 29, 2024 @10:19AM (#39864422)
Dynamo is not mongo?
Re:The Great Migration from MongoDB to PostgreSQL by benterix on Friday March 29, 2024 @11:48AM (#39865491)
No, DocumentDB is Mongo. What I understand the OP parent referred to is the NoSQL hype era, not just Mongo which was probably the most popular one at that time.
Re:The Great Migration from MongoDB to PostgreSQL by LtWorf on Friday March 29, 2024 @10:52AM (#39864774)
They used it at my 1st job, a startup.

They had an ORM which made everything much slower, and the most common operation they did was to add items into lists, which causes the whole document to be resized and requires it to be moved.

It could have been done with 1 sql server, but we needed 4 really heavy mongodb servers instead. And of course our code was buggy so the schema was all over the place.

Re:The Great Migration from MongoDB to PostgreSQL by jimbokun on Friday March 29, 2024 @02:11PM (#39867197)
My company considered it, but went with Cassandra instead.
Re:The Great Migration from MongoDB to PostgreSQL by tomnipotent on Friday March 29, 2024 @07:07AM (#39862648)
Postgres as we know it has only existed for about a decade, since the post-9.x era in 2010-2014 when many of its lauded features were added. Replication, heap-only tuples, extensions, foreign data wrappers, JSON, leveraging multiple indexes, parallel index scans, reindex concurrently, JIT compilation, declarative partitioning, stored procedures, and major WAL improvements are all "recent".

I love Postgres and it's been my go-to default since 2014 and you can pry it from my cold dead hands, but it's more contemporary with Perl 6 than Perl 5 if we're talking grey beards.

Re:The Great Migration from MongoDB to PostgreSQL by Sesse__ on Friday March 29, 2024 @07:14AM (#39862680)
Extensions and stored procedures are not; they've been around for longer.

I do not actually use any of the others you listed (well, occasionally bitmap index scans, but it's not a killer). The main difference between 8.x and 15.x for me is the small stream of optimizer features and tweaks (e.g. at some point, it started being able to reorder outer joins).

Re:The Great Migration from MongoDB to PostgreSQL by tomnipotent on Friday March 29, 2024 @12:02PM (#39865650)
Postgres 8 supported functions capable of returning tuples (RETURN QUERY), but lacked transaction control and other features that CREATE PROCEDURE added in Postgres 11 (2018).

Extensions in Postgres 8 (and earlier) were also half-baked compared to 9.1 (2011), which added CREATE EXTENSION and other quality-of-life improvements including standardization.

The latest complete implementations are what most people have in mind when talking about them.

Re:The Great Migration from MongoDB to PostgreSQL by Sesse__ on Friday March 29, 2024 @06:34PM (#39869753)
Sure, there are improvements, but it's not like Postgres was a radically different beast back then.

Would I pick Postgres 15 over Postgres 8? Yes, any day of the week. But I would also readily pick Postgres 8 over most of today's databases (including e.g. the latest MySQL and MongoDB versions), for most projects, if that was the choice I had.

Re:The Great Migration from MongoDB to PostgreSQL by tomnipotent on Saturday March 30, 2024 @02:34AM (#39872378)
I would not have risked my business (or budget) on Postgres 8, even with Slony-I. My appreciation for its well-written code and thoughtful architecture simply did not outweigh what it lacked for a reliable operations experience.

MySQL foot guns were mostly under control by 2010, and it was operationally efficient to manage a cluster of MySQL servers in diverse configurations with mostly-known boundaries to what could go wrong.

The Postgres foundations are the same today, but what you can build on top is very different today than it was pre-9.x.

Re:The Great Migration from MongoDB to PostgreSQL by sph on Saturday March 30, 2024 @03:15AM (#39872580)
I operated MySQL clusters in the late 2000s. I still am surprised how many hoops you have to jump through to set up replication in PostgreSQL than what you could do - out of the box - with MySQL 15 years ago.
Re:The Great Migration from MongoDB to PostgreSQL by Sesse__ on Saturday March 30, 2024 @03:46AM (#39872735)
> I would not have risked my business (or budget) on Postgres 8, even with Slony-I.

This assumes you need replication, though. You can get pretty far without it, especially given how wide hardware you can get now.

> MySQL foot guns were mostly under control by 2010

Eh. :-) I think you would have to specify which footguns in particular.

Re:The Great Migration from MongoDB to PostgreSQL by turtles3 on Saturday March 30, 2024 @04:41AM (#39872978)
Replication can be for HA, not just for scale. All depends on your business requirements.

Also replication can be good for other operational reasons, such as zero downtime major version upgrades. Again depends on the business need/expectations.

Re:The Great Migration from MongoDB to PostgreSQL by tomnipotent on Saturday March 30, 2024 @04:55AM (#39873048)
If you're doing tens of millions in revenue and the RDBMS is critical to your operations, I'm a firm believer you need replication. Keep in mind this was the era of spinning rust and a day-old backup could take hours to restore even with a SAN/DAS. A replica was for more than just distributing load, it was for resilience to keep the business healthy and avoid a SPOF.

Risks to the business are more important to me than my enthusiasm for a technology or product.

Re:The Great Migration from MongoDB to PostgreSQL by rendall on Friday March 29, 2024 @05:46AM (#39862206)
...and, continuing the cycle next season, devs will (re)discover NoSQL and document DBMS. I do wonder if this phenomenon of trendy tech is somehow integral to advancing the state of the industry, the SWE equivalent of early adopters. "Rediscovering the old" is a side effect, as old tech is used and reinterpreted in new ways. Kind of neat, really.
Re:The Great Migration from MongoDB to PostgreSQL by Retric on Friday March 29, 2024 @06:23AM (#39862415)
There’s an entire industry of people selling knowledge of the “next great thing/the one true way," but they need a new thing every few years as people learned whatever the old thing was.
Re:The Great Migration from MongoDB to PostgreSQL by benterix on Friday March 29, 2024 @09:40AM (#39864002)
> For grey beards, it's all very odd. Like, "where have you all been?"

To be frank, PostgreSQL has evolved a lot since the late nineties. There was a time where people preferred MySQL over it at it seemed to work faster, certain things were easier and so on.

Re:The Great Migration from MongoDB to PostgreSQL by hibikir on Friday March 29, 2024 @10:27AM (#39864503)
I used postgres in the 90s. The biggest complaint was that postgres's default config needed a change so you could connect to it remotely, as the default, wisely at the time, decided that allowing connections from any IP by default before you changed any security setting whatsoever was a real problem.

The MySQL performance advantages were large, with the small caveat that it was fast as long as you were using MyISAM, which achieved its speed by throwing away many safety features, like working transactions and foreign key constraints. Unsurprisingly, when eventually it got an engine that didn't throw caution to the wind, the performance advantage went away.

I spent a lot of time in the early 2000s showing people whose that many of the issues they were facing with their e-commerce websites were ultimately down to the MySQL engine they had picked. But it's faster! Yes it is, but now your application code has to deal with all the things the engine has now offloaded to your application code.

It's not that Postgres' changes were key to increasing market share, but that as MySQL matured, it had no options but to lose its 'advantages'.

Re:The Great Migration from MongoDB to PostgreSQL by kstrauser on Friday March 29, 2024 @10:53AM (#39864794)
That mirrors my experience. MySQL was faster for use cases where data loss was acceptable. Will anyone die if you lose some web log analysis stats? Probably not. You wouldn’t want to use it for anything where guaranteed consistency was critical, like anything involving money, but it was an alright replacement for things like an in-memory data store.

I say “was”. I hear it’s vastly better now.

Re:The Great Migration from MongoDB to PostgreSQL by gkbrk on Friday March 29, 2024 @10:56AM (#39864819)
If you want a fast DB for web log analysis, you shouldn't look at MySQL or PostgreSQL anyway. ClickHouse will run circles around both of them for the use case of web log analysis.
Re:The Great Migration from MongoDB to PostgreSQL by kstrauser on Friday March 29, 2024 @11:06AM (#39864964)
That was an example of the sort of thing that someone might reasonably have used MySQL+MyISAM for in the past. I wouldn’t use that combination at all today.
Re:The Great Migration from MongoDB to PostgreSQL by Shorel on Friday March 29, 2024 @11:31AM (#39865295)
There was a time PostgreSQL did not run under Windows, and that is IMO what gave MySQL the market share edge.

Without these windowless years, PostgreSQL would be the most used RDBMS right now.

Re:The Great Migration from MongoDB to PostgreSQL by jimbokun on Friday March 29, 2024 @02:13PM (#39867217)
MySQL was more popular for a while, but from a technical standpoint Postgres was always ahead.
Re:The Great Migration from MongoDB to PostgreSQL by fijiaarone on Friday March 29, 2024 @09:24PM (#39870955)
PostgreSQL didn’t exist in the 1990s. It was called Ingres. Postgres started as a personal project and was first released in 1999, but was unusable. Around 2004 the project started getting popular and hipsters started screaming that MySQL didn’t have stored procedures and wasn’t fully ACID. Acid became a buzzword for PG fanboys, even though data corruption and memory leaks plagued the system for the first decade. It became a stable around 2008 as long as you didn’t mind restarting your database every few days. PostgreSQL didn’t really become a viable option until around 2010.
Re:The Great Migration from MongoDB to PostgreSQL by forgotmyinfo on Friday March 29, 2024 @11:48AM (#39865492)
This is what happens when you hire 20-somethings who don't know how computers actually work to build your entire business. You either learn about relational databases in school, or through experience. Relational algebra has been around for half a century, at least. If someone doesn't know about its utility, it's a failure of the education system, or a failure of corporate incentives.