Dear hackers,

I’m working on a foreign database wrapper for Kafka [1]
Now I am trying to make it parallel aware. Following 
the documentation [2]
However it seems that I can’t make it use more than a
single worker with force_parallel_mode = on.

I wonder if I need to do more than just implementing the
needed callback function to benefit from multiple workers.

Looking at create_foreignscan_path in path_nodes.c
I found that the ForeignPath seems to always set

pathnode->path.parallel_aware = false;
pathnode->path.parallel_safe = rel->consider_parallel;
pathnode->path.parallel_workers = 0;

Do I need so set these in my GetForeignPaths callback manually?

Is there anything else I need to do?

Thanks

Manuel

[1] https://github.com/adjust/kafka_fdw 
<https://github.com/adjust/kafka_fdw/blob/master/src/kafka_fdw.c>
[2] 
https://www.postgresql.org/docs/current/static/fdw-callbacks.html#FDW-CALLBACKS-PARALLEL
 
<https://www.postgresql.org/docs/current/static/fdw-callbacks.html#FDW-CALLBACKS-PARALLEL>

Reply via email to