Skip to content
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

flowmachine should own all cache tables #4714

Closed
greenape opened this issue Dec 17, 2021 · 4 comments · Fixed by #4770, #5093 or #5189
Closed

flowmachine should own all cache tables #4714

greenape opened this issue Dec 17, 2021 · 4 comments · Fixed by #4770, #5093 or #5189
Labels
bug Something isn't working FlowDB Issues related to FlowDB FlowMachine Issues related to FlowMachine

Comments

@greenape
Copy link
Member

The flowmachine user in Flowdb needs to be the owner of all cache tables in cache schema, otherwise the flowmachine server will be unable to properly clean the cache and error out in trying to do so. Should either explicitly set the owner of the table to flowmachine user, or, there should be a trigger set in Flowdb to do this.

@jc-harrison
Copy link
Member

Re-opening because the currently-implemented trigger doesn't actually affect flowmachine-created cache tables, because 'CREATE TABLE AS' (used to store a flowmachine query result) is a different command from 'CREATE TABLE' (for which the trigger is defined).

@jc-harrison
Copy link
Member

Nope, still not working 🤦

Looks like it doesn't trigger if the 'CREATE TABLE AS' command is within an 'EXPLAIN' statement...

@jc-harrison jc-harrison reopened this Apr 25, 2022
@greenape
Copy link
Member Author

So we can:

  • Find another way to trigger this (e.g. on changes to pg_tables?)
  • Find another way to collect timing info when creating cache tables (instead of via explain)
  • Alter the owner through a non-pg mechanism (e.g. flowmachine should do it)

@greenape
Copy link
Member Author

Can't do the first (pg_tables is a view, no triggers allowed on system tables). Issue with the third is that we currently allow different names for the flowmachine user, so you can't arbitrarily assign ownership to flowmachine, because that user might not exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working FlowDB Issues related to FlowDB FlowMachine Issues related to FlowMachine
Projects
None yet
2 participants