Back to Blog
PostgreSQL Awide Polar HTAP

Awide Labs open-sources Awide Polar: a PostgreSQL fork with compute-storage disaggregation and HTAP capabilities

Vadim Iatsenko
Vadim Iatsenko
October 19, 2026

Awide Labs has released the source code of Awide Polar, our fork of Alibaba’s PolarDB for PostgreSQL, together with our enhanced PolarFS storage layer and Polar Proxy.

Our work focuses on increasing transactional throughput, making replica reads consistent, and supporting hybrid transactional and analytical processing (HTAP) within a shared-storage PostgreSQL architecture. In our pgbench read/write benchmarks, Awide Polar has achieved more than 150,000 transactions per second.

The source code is available on GitHub:

Awide Polar builds on PolarDB’s separation of compute and storage. A primary handles writes, while read replicas access the same underlying data files. Adding a replica therefore does not require maintaining another complete copy of the database. Compute capacity for reads and analytics can grow independently of storage capacity, without introducing application-level sharding.

This remains a single-writer architecture. Our transactional performance work improves the throughput of that writer, while replicas provide additional capacity for reads and analytical queries.

The main differences from upstream open-source PolarDB span the database engine, storage layer, and cluster operations:

  • Less contention in the database engine. Awide Polar brings WAL pipelining and CSN-based MVCC from PolarDB 11 to the PostgreSQL 17-based branch. Dedicated WAL write and flush workers help organize the commit path. We have also increased lock partitioning across WAL insertion, buffer mapping, flush lists, and LogIndex, and reduced synchronization overhead on replicas. These changes target workloads where many concurrent sessions compete for shared resources.
  • A faster PolarFS I/O path. Awide PolarFS replaces polling-based communication with lock-free queues and futex wake-ups. Registered shared buffers enable zero-copy I/O between PostgreSQL and the storage daemon, removing an intermediate page copy. Sharded caches and finer-grained locking reduce contention inside the daemon. In our fio tests with 512 clients, these changes delivered approximately 7× the random-write IOPS and 11× the random-read IOPS of upstream PolarFS. These are filesystem benchmark results, separate from the database TPS measurement.
  • An open-source proxy for consistent replica reads. Polar Proxy adds LSN-aware routing to ProxySQL. Session consistency allows a client to read its own committed writes through a replica. A global mode makes replica reads wait for the latest write LSN observed by that proxy across sessions. The integration supports prepared statements and the extended query protocol, with LSN coordination designed to avoid an additional network round trip. This proxy-level global mode is distinct from globally coordinated transaction snapshots, which remain planned work.
  • High availability and disaster recovery integration. We extended Patroni to understand PolarDB’s shared-storage topology and node roles. We also ported DataMax, a WAL-only relay, to Awide Polar 17. A nearby DataMax can receive WAL synchronously and forward it asynchronously to a remote standby, keeping remote replication latency off the primary’s commit path. Guarded promotion lets a standby retrieve the remaining WAL before taking over. Lossless recovery in this arrangement depends on the acknowledged WAL remaining available, including on DataMax.
  • Correctness and storage safety fixes. Our changes address stale replica reads, CSN visibility and snapshot issues, promotion failures, and WAL fsync error handling. PolarFS adds a cross-host read/write lease to protect against competing writers, implements device flushing for fsync, and fixes memory and lifecycle problems. We have also added CI and improved test and compiler coverage.

HTAP is the other major direction for Awide Polar. Polar’s elastic parallel query engine distributes analytical work across replica workers while accessing the same underlying row-oriented data. This allows transactional processing and analytics to share a dataset without an ETL pipeline into a separate analytical database.

We have already ported Elastic Parallel Query to Awide Polar 15. The port to Awide Polar 17 is in progress. Replica-based execution provides a way to allocate additional compute to analytics, although analytical and transactional workloads still share storage resources.

By opening our work, we want PostgreSQL developers and operators to be able to inspect the implementation, reproduce results, and help improve it. We welcome testing, bug reports, and contributions across the database, filesystem, and proxy repositories.

This announcement is only an overview. Over the coming weeks, we will publish deep-dive posts on the engine, storage and proxy changes described above, and we will keep blogging about the technical side of Awide Polar as the project evolves.

Explore the project at github.com/awide-labs.