Skip to content

run_as field syntax #399

Closed Answered by pashagolub
RG40 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello,

run_as field literally means the role name to run this task under. Suppose we have a role

CREATE ROLE view_owner;

Then if you want to run some task under the view_owner role you set the run_as field to this value. There is no other connection info expected because under the hood this will look like:

SET ROLE view_owner;

REFRESH MATERIALIZED VIEW some_view; -- or whatever your task is doing

RESET ROLE;

To achieve this the role under which pg_timetable is started should be the part of the view_owner role. That means the connection is not established under the view_owner role thus you don't need to specify a password.

Best regards!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pashagolub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
❓ question Further information is requested
2 participants