Live data from Hacker News

Why PostgreSQL is better than MySQL

blog.2ndquadrant.com

71–80 of 100 posts

Re: Why PostgreSQL is better than MySQL

#71
post #38

I'm a huge Postgres fan and yes I'm probably biased towards it. I do think it's probably the best open source database out there, but I also don't love these types of posts. What makes something better than another things is a whole host of things, not just highlighting one really bad case from the other side. I'm sure if the MySQL world wanted they could point out ways that MySQL is so much better than Postgres. Jus…

I remember ages ago (a decade? or so?) I started working at a company using Postgres for a project, and one of the things my boss asked me to do was to set up replication for the database. We had it on all of our MySQL databases, and everyone knew (myself included) that Postgres was a more serious, enterprise-y, "real" database. Well, I googled around and couldn't find anything conclusive, so I hopped into the / chan…

And it was the community that drew me in. Very early in my database career, I was having massive performance problems with my postgres install. I sent a very sharply toned message to the postgres performance mailing list. Within hours of that message, I was trading stack traces with Tom Lane. He was under no obligation to help me; in fact, I was, in hindsight, kinda a dick about it. But he did.

You probably can't buy support of that caliber, no matter how much money you throw at it.

YM, as always, MV.

Re: Why PostgreSQL is better than MySQL

#72

Earlier quoted context omitted.

Just look back at how long it too for us to get upsert, we're finally getting a better replication story in recent years. Coincidentally, using those two features together on MySQL can have fun results: "Because the results of INSERT ... SELECT statements depend on the ordering of rows from the SELECT and this order cannot always be guaranteed, it is possible when logging INSERT ... SELECT ON DUPLICATE KEY UPDATE sta…

You're wrong, and interestingly, you're omitting the key part: > Such statements produce a warning in the error log when using statement-based mode and are written to the binary log using the row-based format when using MIXED mode The problem you're writing about is not related to MySQL itself, it's a problem implicit in statement-based replication. Row/mixed mode replication has been available in MySQL since 5.1 (al…

You do realize that I didn't write "insanity", right? All I said is "can have fun results".

In any case, there are two issues described in my post.

Re: Why PostgreSQL is better than MySQL

#74
What annoys me about MySQL is that it gets simple basic SQL wrong. For example

  update foo set a = b, b = a
is supposed to swap the values in columns a and b, according to the SQL standard. Logically, all of the right hand sides are evaluated using the pre-update values from the columns, and then the results are assigned.

In MySQL, it logically does the assignments left to right, not evaluating an assignment's right hand sides until it gets to that assignment, and that evaluation uses the updated values from the already evaluated assignments.

In Python terms, it is supposed to be like this:

  a, b = b, a
but it is instead like this:

  a = b
  b = a
If we had the time, I'd love to switch to something else just to get rid of annoyances like that.

Re: Why PostgreSQL is better than MySQL

#76

Earlier quoted context omitted.

This is a pretty huge deal in some uses cases. It makes undoing a bad migration trivial.

Manually cleaning up a bad migration fucking sucks. The best you can do is make migrations idempotent in both directions.

Making migrations idempotent in both directions — when you can — is generally a good idea anyway.

Re: Why PostgreSQL is better than MySQL

#78

Earlier quoted context omitted.

That seems like a bit of a false dichotomy. Do the Postgres Devs genuinely see having a bug tracker as a "bad thing"? Or are they just stuck in their ways at this point? A mailing list hardly seems like an efficient method for tracking bugs unless a major part of the efficiency is reducing signal to noise by make it more difficult for non-developer or non-paying users to file bugs

Well, it was not really meant entirely seriously, of course. I can't speak for other devs contributing to the project, but I think the mailing list is a great way to do this. Ultimately, what you want is a simple way to track information about reported issues, discuss the details, make it reasonably simple to search for existing issues, and post patches fixing the issue. A mailing list does all of that, without havin…

> Why do you think it's more difficult to report a bug this way, compared to a bug tracker?

As an end-user the first thing I want to do before reporting a bug is search and see if it has already been reported or if it is being worked on and when it is expected to be released. If I was told that I had to dig through mailing list I would probably just stop before I even started.

> Can you explain why you think a mailing list is less efficient than a bug tracker?

As a bug reporter, I want a friendly way efficiently search and filter existing bugs based on status, version, subsystem, etc. I also want to be able to subscribe to a specific bug to get updates. Maybe you guys have some way to get all those features from a mailing list, but new users certainly won't have a clue.

As a developer I want to be able to easily tag, filter, assign and triage bugs. Assign priorities and associate them with releases and pull requests. I also want to be able to do high level reporting.

Re: Why PostgreSQL is better than MySQL

#79

I'm a huge Postgres fan and yes I'm probably biased towards it. I do think it's probably the best open source database out there, but I also don't love these types of posts. What makes something better than another things is a whole host of things, not just highlighting one really bad case from the other side. I'm sure if the MySQL world wanted they could point out ways that MySQL is so much better than Postgres. Jus…

Uber had a pretty good argument not long ago on going from Postgres back to MySQL: https://eng.uber.com/mysql-migration/

Ahhh Uber, the leading light on how to do things right.

Re: Why PostgreSQL is better than MySQL

#80
post #38

Earlier quoted context omitted.

I remember ages ago (a decade? or so?) I started working at a company using Postgres for a project, and one of the things my boss asked me to do was to set up replication for the database. We had it on all of our MySQL databases, and everyone knew (myself included) that Postgres was a more serious, enterprise-y, "real" database. Well, I googled around and couldn't find anything conclusive, so I hopped into the / chan…

So why is replication necessary?

I am not a DBA; But it's to ensure high availability.
Post reply on HN