Databases 10 min read

Why Top Chinese Tech Giants Choose PostgreSQL Over MySQL – Key Benefits

Amid rising demand for open‑source, self‑controlled databases in China, major firms such as Tencent, Alibaba, and Huawei have built PostgreSQL‑based distributed, cloud‑native solutions, citing PostgreSQL’s richer data types, native sequence support, extensible ecosystem, advanced monitoring, robust replication, and true open‑source licensing as decisive advantages over MySQL.

Architect's Guide
Architect's Guide
Architect's Guide
Why Top Chinese Tech Giants Choose PostgreSQL Over MySQL – Key Benefits

PostgreSQL has become the preferred open‑source foundation for many Chinese cloud and database vendors because of its stability, extensibility, and advanced feature set.

PostgreSQL‑based products in China

Tencent Cloud TDSQL‑PG (open‑source name TBase) – https://github.com/Tencent/TBase Alibaba Cloud PolarDB for PostgreSQL – adds a shared‑storage layer that enables "one‑write‑multiple‑read" scaling.

Huawei Cloud GaussDB (compatible with the PostgreSQL ecosystem) – https://opengauss.org Hangzhou Yijing openHalo –

https://github.com/HaloTech-Co-Ltd/openHalo

Technical advantages of PostgreSQL over MySQL

Rich data‑type support

Array types : ARRAY lets a column store multiple values without a separate join table.

Range types : Built‑in types such as int4range and tsrange model intervals (time, price, etc.) and support range operators.

Composite types : User‑defined structs (e.g., POINT(x,y)) map directly to real‑world objects.

JSONB : Binary JSON storage with indexing, containment queries and fast updates, far more powerful than MySQL's plain JSON column.

Independent sequence objects

PostgreSQL provides true sequence objects that are not tied to any table, enabling globally unique identifiers across tables and services.

-- Create an independent sequence
CREATE SEQUENCE order_seq START WITH 1 INCREMENT BY 1;

-- Use the sequence to generate IDs
INSERT INTO orders (id, name) VALUES (nextval('order_seq'), 'test');

MySQL only offers AUTO_INCREMENT (or a simulated SEQUENCE in 5.7+) which is bound to a single table, making cross‑table uniqueness and distributed‑system guarantees difficult.

Extensibility via extensions

PostgreSQL’s extension framework allows third‑party modules to be loaded at runtime. Widely used extensions include: TimescaleDB – time‑series database with automatic partitioning and compression. pg_trgm – fuzzy string matching and similarity search. Citus – distributed sharding and parallel query execution. pg_stat_statements – detailed SQL execution statistics.

Built‑in monitoring and diagnostics

PostgreSQL ships with a rich set of system catalog views: pg_stat_activity – current sessions and their state. pg_stat_statements – aggregated query performance data. pg_locks – lock information for deadlock detection. EXPLAIN ANALYZE – shows actual execution time and row counts.

These views integrate easily with third‑party visual tools such as PgAdmin, pg_stat_monitor, and Prometheus + Grafana.

Replication and high availability

PostgreSQL offers multiple replication mechanisms:

Streaming replication – asynchronous or synchronous WAL streaming from primary to standby.

Logical replication – replicates selected tables or publishes changes for cross‑version upgrades.

Write‑Ahead Logging (WAL) – guarantees durability and consistency.

Synchronous replication – primary waits for at least one standby acknowledgment, achieving zero data loss on failover.

MySQL’s native replication is primarily asynchronous; semi‑synchronous requires extra configuration and still cannot guarantee zero‑loss recovery.

Multi‑Version Concurrency Control (MVCC)

PostgreSQL stores multiple row versions directly in the heap. Old versions remain until a VACUUM process removes them, providing true snapshot isolation and serializable transaction semantics.

MySQL’s InnoDB keeps only the current version in the table and moves previous versions to an undo log. This yields faster reads but can cause undo‑log bloat for long‑running transactions.

Feature‑level comparison

License : PostgreSQL uses a BSD‑like license that is fully free; MySQL is GPL‑plus‑commercial, controlled by Oracle.

Community vs enterprise : PostgreSQL’s community edition contains the full feature set; MySQL’s enterprise edition adds proprietary features such as advanced auditing and encryption.

Source transparency : PostgreSQL development is globally coordinated and fully open; MySQL’s core development is steered by Oracle with limited community contribution.

Long‑term stability : PostgreSQL is maintained by the PostgreSQL Global Development Group, independent of any single vendor’s roadmap.

Summary

PostgreSQL excels in scenarios that require complex data models, strong consistency, and extensibility. Its native sequence support, advanced data types, robust replication options, and mature monitoring ecosystem make it a solid foundation for distributed, cloud‑native, and HTAP databases. MySQL remains a good choice for read‑heavy web applications with fast time‑to‑market, but its technical limitations—especially around data types, sequence handling, and high‑availability guarantees—explain why many large Chinese cloud providers have chosen PostgreSQL as the core of their next‑generation database services.

MySQLPostgreSQLDatabase comparisonExtensions
Architect's Guide
Written by

Architect's Guide

Dedicated to sharing programmer-architect skills—Java backend, system, microservice, and distributed architectures—to help you become a senior architect.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.