-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parallel and volatile categories to PG functions #181
Comments
Referencing CartoDB/cartodb-postgresql#300 to give a bit more of context. cc'ing @andy-esch and @jgoizueta for awareness |
Thanks @rafatower. From Paul's comment in CartoDB/cartodb-postgresql#300:
Some of the PL/Python functions internally use |
Technically speaking, reading shouldn't be an issue as long as you are sure you are only reading. For example, in the PR (#183) I've marked for now a lot of python functions as unsafe because they execute an external subquery that we don't know anything about.
This is not parallelizable (and not STABLE either). One possible solution is to also provide a signature that receives directly the data instead of the query; another one is to blindly trust the user and hope it sends a PARALLEL SAFE subquery. |
Deploying 0.6.1 to test in Staging. There was a couple of issues with the servers (https://github.com/CartoDB/cartodb-platform/issues/3737) but I've updated a single user and it seems to be working fine:
Once the issue is resolved I'll update all users in staging and, if no issues appear, deploy to production. cc/ @rafatower |
As CartoDB/cartodb-postgresql#300, with pg9.6+ there is the option to mark functions as PARALLEL (different levels) so the analyzer can decide to run the query in several processes simultaneously.
In a similar fashion, marking the VOLATILE category enables optimizations to avoid re-running queries (or some parts of a query).
Should maintain compatibility with previous PostgreSQL releases (at least for now).
The text was updated successfully, but these errors were encountered: