First of all, I'm really excited about your initiative and this project.
I'm using the citus PG extension for a distributed, horizontally scaled database. It significantly improves performance for data import and OLTP.
But, I'm now looking into adding OLAP capabilities and would be interested in using pg_duckpipe for a seamless HTAP solution.
My question is: would it be possible to adapt pg_duckpipe to support citus? Or, perhaps some parts would have to be adapted by pg_duckpipe and others by citus.
The way citus works, you fire up a number of PG nodes having the citus extension. One acts as the master node, while the rest act as worker nodes. For each table that is marked for distribution, citus takes care of creating shard tables on the worker nodes and distributing the initial data. Citus also takes care of seamless fan-out/fan-in of queries so they hit the necessary shard tables that contain the actual data.
First of all, a single source table would be mapped to a single target table in DuckLake, although the actual source data would be distributed in multiple shard tables in different databases (worker nodes). The pg_duckpipe fan-in capability would have to be adapted to handle this situation, where WAL from multiple source shard tables need to be collected from the worker nodes and mapped to a single DuckLake table. Should pg_duckpipe run on the master node or should each worker node have its own pg_duckpipe?
Second, when issuing a query to a source table, the pg_duckpipe transparent query routing would have to be adapted so that pg_duckpipe and citus co-operate, since both use hooks to route queries (citus to shards on worker nodes and pg_duckpipe to DuckLake).
Would be glad to hear your take on this.
First of all, I'm really excited about your initiative and this project.
I'm using the citus PG extension for a distributed, horizontally scaled database. It significantly improves performance for data import and OLTP.
But, I'm now looking into adding OLAP capabilities and would be interested in using pg_duckpipe for a seamless HTAP solution.
My question is: would it be possible to adapt pg_duckpipe to support citus? Or, perhaps some parts would have to be adapted by pg_duckpipe and others by citus.
The way citus works, you fire up a number of PG nodes having the citus extension. One acts as the master node, while the rest act as worker nodes. For each table that is marked for distribution, citus takes care of creating shard tables on the worker nodes and distributing the initial data. Citus also takes care of seamless fan-out/fan-in of queries so they hit the necessary shard tables that contain the actual data.
First of all, a single source table would be mapped to a single target table in DuckLake, although the actual source data would be distributed in multiple shard tables in different databases (worker nodes). The pg_duckpipe fan-in capability would have to be adapted to handle this situation, where WAL from multiple source shard tables need to be collected from the worker nodes and mapped to a single DuckLake table. Should pg_duckpipe run on the master node or should each worker node have its own pg_duckpipe?
Second, when issuing a query to a source table, the pg_duckpipe transparent query routing would have to be adapted so that pg_duckpipe and citus co-operate, since both use hooks to route queries (citus to shards on worker nodes and pg_duckpipe to DuckLake).
Would be glad to hear your take on this.