Pcornel
Technology Comparisons

PostgreSQL vs MariaDB/MySQL

Compare the two most common open-source relational database servers from an operations point of view.

DimensionPostgreSQLMariaDB / MySQLWhat it means in practice
Process modelOne process per connection.One thread per connection (thread pool optional).PostgreSQL usually needs a connection pooler at high connection counts.
ConcurrencyMVCC with row versions in the table; vacuum cleans up.InnoDB MVCC with undo logs; purge cleans up.Long transactions cause bloat in PostgreSQL and undo growth in InnoDB.
ReplicationPhysical streaming replication and logical replication.Binlog-based replication (row format), GTIDs; Galera for MariaDB clusters.Both support asynchronous and (semi-)synchronous modes.
Authentication configpg_hba.conf plus roles.Accounts as user@host with GRANTs.Access problems are found in different places.
Backup toolspg_dump, pg_basebackup, WAL archiving.mysqldump/mariadb-dump, Mariabackup/XtraBackup, binlogs.Both need log archiving for point-in-time recovery.
Verificationpsql -c "SELECT version();"; pg_stat_activitymariadb -e "SELECT VERSION();"; SHOW PROCESSLISTCheck the version before using version-specific features.

← All comparisons

Confirmation

Confirm action

Continue?