Databases 9 min read

Why Top Chinese Tech Giants Choose PostgreSQL Over MySQL

Amid China's push for independent, cloud‑native databases, leading firms like Tencent, Alibaba, Huawei and others have built PostgreSQL‑based solutions, and this article analyzes why PostgreSQL’s richer data types, true sequence objects, extensible ecosystem, advanced replication and licensing advantages make it a preferred choice over MySQL.

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

In recent years, the demand for self‑controlled, cloud‑native databases in China has grown rapidly. PostgreSQL, with its open‑source nature, stability, and rich feature set, has become the preferred foundation for many domestic technology leaders developing distributed or HTAP database systems.

Chinese Companies Building on PostgreSQL

Tencent Cloud TDSQL PG (code‑named TBase) – https://github.com/Tencent/TBase Introduces a global transaction manager (GTM) and distributed coordination to enable cross‑shard transactions.

Alibaba Cloud PolarDB for PostgreSQL

Rewrites the storage layer to achieve “one‑write‑multiple‑read shared storage,” allowing read replicas to scale in seconds.

Huawei Cloud GaussDB (compatible with the openGauss ecosystem) – https://opengauss.org Adds a column‑store engine and AI‑optimized planner to support HTAP workloads.

Hangzhou Yijing Shutong openHalo –

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

Why PostgreSQL Beats MySQL in Key Technical Dimensions

1. Richer Data Types

MySQL’s core data types are relatively basic, which can limit complex modeling. PostgreSQL offers:

Array types : Store multiple values in a single column.

Range types (e.g., int4range, tsrange) for intervals such as time or price ranges.

Composite types : Custom structures like POINT(x,y) that map directly to real‑world objects.

JSONB : Binary JSON with indexing, querying, and updating capabilities, far outperforming plain JSON fields.

2. Native Sequence Objects

PostgreSQL provides true independent sequences that can be used without tying to a table. Example:

-- Create an independent sequence in PostgreSQL
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 simulates sequences with AUTO_INCREMENT + offset and lacks a standalone sequence object, making cross‑table sharing and guaranteed uniqueness in distributed environments difficult.

3. Extensible Ecosystem

PostgreSQL’s powerful extension mechanism enables a wide range of add‑ons, such as: TimescaleDB: Time‑series database with automatic partitioning and compression. pg_trgm: Fuzzy matching and similarity search. Citus: Distributed database extension. pg_stat_statements: SQL execution statistics and monitoring.

These extensions turn PostgreSQL into a programmable platform, whereas MySQL remains a more limited execution engine.

4. Monitoring and Performance Tools

PostgreSQL ships with built‑in statistics views such as pg_stat_activity, pg_stat_statements, and pg_locks, and supports EXPLAIN ANALYZE for accurate execution metrics. Mature third‑party tools like PgAdmin, pg_stat_monitor, and Prometheus + Grafana provide rich visualizations.

MySQL’s monitoring relies mainly on Performance Schema and slow_query_log, which are harder to configure and interpret, and lack integrated visual tools.

5. Replication Capabilities

MySQL’s primary/replica model suffers from asynchronous lag, limited consistency guarantees, and complex GTID configuration. PostgreSQL offers:

Streaming Replication (asynchronous or synchronous).

Logical Replication for table‑level or cross‑version data movement.

Robust Write‑Ahead Logging (WAL) ensuring durability and consistency.

Synchronous Replication that blocks the primary until at least one replica confirms the transaction, achieving zero data loss.

6. Licensing and Community

MySQL is governed by the GPL with a commercial Oracle‑controlled edition, while PostgreSQL uses a BSD‑like license that is completely free. PostgreSQL’s development is driven by a global community, offering transparent source code, no feature‑cutting community edition, and long‑term stability independent of any single vendor.

7. MVCC Implementation Differences

PostgreSQL stores multiple row versions directly in the heap, providing full isolation and true snapshot consistency. MySQL keeps only the current version in the table and stores older versions in an undo log, which can lead to faster reads but may cause undo‑log bloat under long transactions.

Conclusion

PostgreSQL and MySQL each excel in different scenarios. For systems that require long‑term evolution, complex data models, and strong consistency, PostgreSQL offers a more solid foundation. For quick‑to‑market web applications with read‑heavy workloads, MySQL remains efficient. The rise of domestic Chinese databases demonstrates how leveraging PostgreSQL’s open‑source strengths can drive independent innovation.

MySQLreplicationOpen SourcePostgreSQLDatabase 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.