Awide Labs open-sources Awide Polar, PostgreSQL fork with compute-storage separation
Awide Labs released Awide Polar, an open-source fork of Alibaba's PolarDB for PostgreSQL featuring compute-storage disaggregation, HTAP support, and a ProxySQL-based proxy for consistent replica reads.
Summary
Awide Labs has open-sourced Awide Polar, its fork of PolarDB for PostgreSQL built on PostgreSQL 17. The project separates compute and storage so read replicas share underlying data files without full copies, while a primary handles writes. The release includes three components: the database engine with WAL pipelining and increased lock partitioning, an enhanced PolarFS storage layer with lock-free I/O queues, and Polar Proxy for LSN-aware read/write splitting. The company reports over 150,000 TPS in pgbench read/write tests and 7-11x filesystem IOPS improvements over upstream PolarFS.
What Awide Polar changes in engine, storage, and proxy
- Database engine: WAL pipelining and CSN-based MVCC ported from PolarDB 11 to PostgreSQL 17; dedicated WAL write/flush workers; increased lock partitioning across WAL insertion, buffer mapping, flush lists, and LogIndex; reduced replica synchronization overhead
- PolarFS storage: Replaced polling with lock-free queues and futex wake-ups; zero-copy I/O via registered shared buffers; sharded caches and finer-grained locking; ~7x random-write IOPS and ~11x random-read IOPS in fio tests with 512 clients versus upstream PolarFS
- Polar Proxy: LSN-aware routing added to ProxySQL; session consistency for reading own writes through replicas; global mode waits for latest write LSN observed by proxy across sessions; supports prepared statements and extended query protocol without extra network round trip
- HA/DR: Extended Patroni for shared-storage topology; ported DataMax WAL-only relay for synchronous nearby/async remote replication; guarded promotion with lossless recovery dependent on acknowledged WAL availability
- Correctness fixes: Stale replica reads, CSN visibility, snapshot issues, promotion failures, WAL fsync error handling; PolarFS adds cross-host read/write lease, device flushing for fsync, memory and lifecycle fixes
- HTAP: Elastic Parallel Query ported to Awide Polar 15; port to version 17 in progress; distributes analytical work across replica workers on same row-oriented data
Why it matters
Awide Polar offers a fully open-source implementation of cloud-native PostgreSQL architecture with compute-storage separation, giving operators an alternative to proprietary managed databases or Alibaba's own PolarDB service. The HTAP direction—running analytics on replicas without ETL—could reduce infrastructure complexity for organizations already committed to PostgreSQL.
Original reference: postgr.es →