Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
701 stars 145 forks source link

PostgreSQL 9.6 -- IsForeignScanParallelSafe #172

Open rotten opened 7 years ago

rotten commented 7 years ago

One of the most important new features in PostgreSQL 9.6 are parallel query capabilities.

In the documentation on the subject: https://www.postgresql.org/docs/9.6/static/parallel-safety.html

They mention this bullet item with little else to illuminate the topic:

The following operations are always parallel restricted.

  • Scans of foreign tables, unless the foreign data wrapper has an IsForeignScanParallelSafe API which indicates otherwise.

It isn't clear yet to me if FDW developers have to implement something special to support this option, or if you just tell PostgreSQL it is a safe API and give it a try.

If it does require the FDW developer to do something special, is this something that we would implement in Multicorn; in the Multicorn child FDW's; or in both?