Rich Freeman via plug on 6 Dec 2021 09:39:39 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Thoughts on MySQL from a developer


On Mon, Dec 6, 2021 at 11:16 AM Isaac Bennetch via plug
<plug@lists.phillylinux.org> wrote:
>
>
> According to the PostgreSQL manual, backups at the file system level should follow the same process MySQL does: (1) the daemon/service must be stopped and (2) take the entire data directory, not just one specific database (I'm simplifying a bit, when using no InnoDB tables, one can acquire a read lock and keep the server running, but it's a lot of "ifs" to ensure consistent data compared to simply stopping and restarting the server).

I'm not aware of any database that supports just backing up at the
filesystem level without stopping the service.  They all provide
backup tools that provide transactional guarantees, and this should be
the way it is done.

I don't think anybody (important) has claimed that there is something
magical about Postgres's on-disk format.

>
> I still prefer to export SQL files to make sure I have a full and consistent backup, but it doesn't look like PG does anything special compared to MySQL to allow file system backups while the server is running.

It has been a while since I've used MySQL.  Does mysqldump ensure the
entire backup is atomic?

I'm sure things have changed, but historically many of the performance
benefits of MySQL came from a lack of transactions/etc (at least in
ISAM).  Obviously if you ditch having atomic queries you can reduce
memory/CPU requirements significantly.

I do agree with Brent's earlier sentiment that those sorts of features
are not always required.  My beef with a lot of people using MySQL at
least in the early days is that they didn't have much knowledge of
databases and were not making an informed decision about what
technologies they used.  At least in the past databases were not
something taught much in CS courses despite of course being fairly
critical in most actual applications.

There are lots of reasons to use this data storage technology or that,
but I think a lot of people just seize on one buzzword and use it for
everything.  To be fair that includes people who use ACID transactions
for everything, but if you're going to make an uninformed decision,
choosing the technology that provides the highest level of data
consistency and maybe having to pay a bit more to host it isn't the
worst outcome.

--
Rich
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug