Using PLV8 for RPC Calls with PostgREST #2084
-
Hello y'all! Looking into making a few RPC functions with PLV8 and having a performance question. These functions will receive significant web traffic after being made available via PostgREST, and the specific question I have is around this part in the docs at https://plv8.github.io
I know that PostgREST extensively uses the SET ROLE feature to locally scope privileges for each request made. As such, would each request initialize a separate JS runtime? In more general terms, would anyone see any problems with making a high traffic RPC function with PLV8 instead of PLSQL via PostgREST? Appreciate any help, and appreciate as always the great work on PostgREST! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I have not worked with plv8, yet, but I imagine you could reduce the number of effective This would not remove the But before going anywhere in that direction, I'd just test the performance for real. There is no point in trying to optimize something that might not even be a problem. |
Beta Was this translation helpful? Give feedback.
-
Did you try using plv8 and have some experience to share by now? |
Beta Was this translation helpful? Give feedback.
Did you try using plv8 and have some experience to share by now?