News for hackers. Stuff that matters.
Re:Ghost 1.0 by ihuman on Thursday July 27, 2017 @10:28AM (#14865596)
What were they using before, and what's wrong with MySQL?
Re:Ghost 1.0 by jlmn on Thursday July 27, 2017 @10:37AM (#14865681)
Postgres was an option for production along MySQL and SQLite3 was suggested for development instances. Sqlite3 is still supported.

The mentioned why they dropped it here: https://dev.ghost.org/dropping-support-for-postgresql/

> Without active community support, Postgres has always been, and always will be a second-class citizen. For that reason, we are dropping official Postgres support from Ghost core.

Re:Ghost 1.0 by andrewbarba on Thursday July 27, 2017 @11:01AM (#14865919)
This is incorrect, Postgres was always second class. I know because I tried my best to keep it running on postgres for months, back the 0.5.x days, and it was always a source of frustration.
Re:Ghost 1.0 by seanwilson on Thursday July 27, 2017 @11:17AM (#14866079)
What kinds of problems did it have? Why is it so difficult to support MySQL and Postgres at the same time, and why would MySQL be prioritised?
Re:Ghost 1.0 by erisds on Thursday July 27, 2017 @12:07PM (#14866586)
I answered this question in as much detail as possible in the blog post I wrote at the time (which was also linked in the above comment) https://dev.ghost.org/dropping-support-for-postgresql/
Re:Ghost 1.0 by zimpenfish on Thursday July 27, 2017 @11:39AM (#14866283)
> why would MySQL be prioritised?

"Because it's easier to slap a system together on MySQL". Which, to be fair, it is but that's not a good thing when you're talking about data.

Re:Ghost 1.0 by e12e on Thursday July 27, 2017 @10:17PM (#14871413)
Probably not that - but Ghost was born in many ways as "a better wordpress" (or a not batshit crazy mess of old code and not properly namespaced plugins and themes).

The model it replaces/improves on is self-host on shared-hosting web hosts. That used to be php and mysql - I guess they kept mysql, even if nodejs doesn't lend itself to the same type of shared hosting as php does (in fact, neither does php, but that's a battle for another day).

Anyway, many hosting services will throw in a database instance on a more-or-less well-managed mysql cluster - at a minimum there might be some semi-regular backups of the database, with some automation for doing restores (and with more than a bit of luck, they'll keep snapshots, so that the sql injection that wiped your database haven't resulted in all-empty backups by the time you realize).

I don't think it makes much sense, but I doubt it is because "postgres is hard, mysql is easy".

Re:Ghost 1.0 by seanwilson on Thursday July 27, 2017 @08:11PM (#14870927)
Why is it easier though?
Re:Ghost 1.0 by zimpenfish on Friday July 28, 2017 @06:11AM (#14873177)
Because it was a lot easier to deal with permissions, you could write "SQL" rather than SQL, it was very lax with SQL keywords as table names (ie. you could create a table called 'user'), replication didn't involve selling your soul to several devils, etc.

It's like Rails - it's easy to slap something up but once you start using it in anger, it requires all the handholding and effort.

Re:Ghost 1.0 by jlmn on Thursday July 27, 2017 @11:18AM (#14866084)
You're correct. I've edited my comment for clarity.
Re:Ghost 1.0 by zimpenfish on Thursday July 27, 2017 @11:37AM (#14866257)
> what's wrong with MySQL?

After many years of security issues and its general inability to be a good database, I refuse to install it on any of my own boxes. If I need something heavyweight, I'll use Postgres; otherwise it'll be SQLite - both of which manage to be more secure and competent than MySQL.

Re:Ghost 1.0 by dna_polymerase on Thursday July 27, 2017 @11:43AM (#14866326)
> inability to be a good database

Judging from shitloads of successful companies and projects running MySQL in production I'd argue the inability here is with the developer. Can you substantiate your claim or is your dissatisfaction just rooted in your inability to run a MySQL server?

Re:Ghost 1.0 by vertex-four on Thursday July 27, 2017 @12:06PM (#14866571)
Or... perhaps those companies are just able to paper over MySQL's deficiencies at a lower cost than switching to Postgres with a product that's already in production. MySQL is very, very well-documented to be a poor database engine that does some terrible things with your data without warning.

There's several good alternatives - Postgres being free, MS SQL Server being a reasonable paid-for option, and there's Oracle and IBM's database systems at the high end.

One of the only reasons to develop a new project for MySQL (assuming your developers are at all capable of writing queries for Postgres, which is hopefully the case) is that you know your deployment environment is going to have MySQL. Which is probably the case here - LAMP is still a popular stack among PHP developers, so there's a very good chance that anyone wanting to deploy Ghost already has a MySQL server.

Re:Ghost 1.0 by neverminder on Thursday July 27, 2017 @12:17PM (#14866680)
Run this query on both MySQL and Postgresql, should explain it all: SELECT 0 = 'banana'
Re:Ghost 1.0 by hobs on Thursday July 27, 2017 @06:01PM (#14870019)
MySQL has a historical record of fast then correct. Much of this has been fixed over the years, but scars still shine on the skin of DBAs and sysadmins in many many places.

Also, big appeal to authority here, many successful companies do silly things with databases.

Re:Ghost 1.0 by zimpenfish on Thursday July 27, 2017 @12:23PM (#14866739)
Having run MySQL servers and suffered the problems for many years before I finally gave up, I don't think it's my inability that's the issue here.

As a counterpoint, many successful companies run PHP in production but I don't think anyone would claim that means it's a good language.

(One example of where MySQL lack{s,ed}: Postgres with a functional index on a field handled the exact same query on the exact same data a couple of orders of magnitude faster than MySQL on the exact same box.)

Re:Ghost 1.0 by y4mi on Thursday July 27, 2017 @01:09PM (#14867282)
eh, quite a few people say that the later php versions are wonderful to work with.

not talking from experience though, never used it for anything remotely serious.

Re:Ghost 1.0 by fusiongyro on Thursday July 27, 2017 @03:23PM (#14868510)
This post from a year or two ago is a pretty good summary of what's wrong with MySQL:

https://grimoire.ca/mysql/choose-something-else

Re:Ghost 1.0 by andrewbarba on Thursday July 27, 2017 @10:32AM (#14865638)
The original default was actually SQLite3