Schedule - PGConf.DE 2025
Unleashing the Elephant Herd: Decentralized Query Processing Across PostgreSQL Instances
Date: 2025-05-09
Time: 13:35–14:20
Room: Ballsaal 3
Level: Intermediate
Analytical queries that combine tables from multiple PostgreSQL instances are increasingly common, yet existing solutions rely on a mediator-wrapper approach, centralizing execution in a single coordinator. Whether using FDWs inside PostgreSQL or external engines like Presto/Trino, these systems fail to push down cross-instance joins, leading to expensive data movement and processing bottlenecks.
We introduce XDB, a middleware that decentralizes query execution across PostgreSQL instances. Instead of centralizing processing, XDB leverages PostgreSQL's SQL/MED (FDWs) and views to execute federated queries—including cross-instance joins—entirely within the participating databases. This inter-instance execution pipeline minimizes data movement, maximizes parallelism, and allows seamless adoption without changes to federated SQL queries.
In this talk, we'll explore XDB's internals (optimization and delegation approach), demonstrating how fully offloading execution to PostgreSQL instances can outperform traditional federated query solutions. We'll also present performance comparisons, showing that decentralization eliminates the need for additional heavyweight query engines in many scenarios.