Follow us
Breaking
Tech News

What Changed in PostgreSQL 17 for Teams Choosing Between MySQL and MariaDB

PostgreSQL 17, released on September 26, 2024, fundamentally shifts the performance calculus for teams currently running MySQL or MariaDB.

Share

PostgreSQL 17, released on September 26, 2024, fundamentally shifts the performance calculus for teams currently running MySQL or MariaDB. The release introduces a new internal memory structure for vacuum that consumes up to 20x less memory, directly addressing the bloat and transaction ID management issues that often force MariaDB operators into routine maintenance cycles. High concurrency workloads see up to 2x better write throughput due to improvements in write-ahead log processing, while the new streaming I/O interface speeds up sequential scans and ANALYZE operations. These gains make PostgreSQL a clear contender for complex reporting and analytics on live data, where its query planner already outperforms the InnoDB engine used by both MySQL and MariaDB.

Performance and Data Handling Gains

The most significant operational improvement is the overhaul of the vacuum process. By reducing memory usage by a factor of twenty, PostgreSQL 17 frees shared resources for actual workload execution, making it more stable under heavy write loads than previous versions. This stability matters because MariaDB’s InnoDB engine keeps undo logs separately, which generally requires less routine maintenance but can still inflate history length during long-running transactions. For teams handling high-frequency reads and conditional lookups, PostgreSQL 17 maintains lower latency even when concurrent inserts are occurring, a scenario where MySQL query latency increases noticeably.

JSON support also expands with the addition of the JSON_TABLE command, which converts JSON data into a standard table representation within the FROM clause. Developers gain access to SQL/JSON constructors like JSON_SCALAR and query functions such as JSON_EXISTS, providing richer ways to interface with semi-structured data without losing indexing capabilities. While MariaDB stores JSON as LONGTEXT and relies on generated columns for indexing, PostgreSQL’s jsonb type offers binary storage with GIN indexes, making it superior for applications where JSON paths are varied and central to the workload. The MERGE command now supports a RETURNING clause and updates to views, streamlining UPSERT operations that previously required multiple statements.

Replication and Upgrade Path

Logical replication enhancements simplify high availability and major version upgrades, removing a significant friction point for teams considering a switch. Starting with upgrades from PostgreSQL 17, users do not have to drop logical replication slots, which previously required resynchronizing data to subscribers after an upgrade. This feature ensures that subscription dependencies migrate cleanly, saving time and reducing the risk of data loss during version transitions. The new pg_createsubscriber tool further simplifies operations by converting a physical standby server into a logical replica, creating publisher and subscriber nodes for specified databases automatically.

For teams currently using MariaDB’s Galera Cluster for multi-primary writes, the shift to PostgreSQL requires assembling HA with tools like Patroni or managed operators like CloudNativePG. This approach involves more moving parts to own yourself compared to Galera’s built-in synchronous clustering, but it provides stronger bases for selective replication and change data capture into Kafka via Debezium. If your workload demands zero-downtime major upgrades or CDC, PostgreSQL’s logical replication is the stronger foundation. However, if you need multi-primary writes with automatic failout and minimal assembly, Galera remains a real argument for staying with MariaDB. The decision ultimately rests on whether your team values the flexibility of logical replication or the simplicity of synchronous clustering.

Share

Technewsdaily

Senior tech writer covering AI, gadgets and cybersecurity. Breaking down the news that matters, every day.