I have successfully set up pgAgent daemon (running on the same server as Postgres 9.3). I would like to restrict permissions on pgAgent. Created 'pgagent' login role, and granted it (via group role) all permissions on postgres.pgagent schema:
CREATE ROLE pgagent LOGIN NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION; CREATE ROLE scheduler NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION; GRANT scheduler TO pgagent; grant all on schema pgagent to scheduler; grant all on all tables in schema pgagent to scheduler; grant all on all functions in schema pgagent to scheduler; grant connect on database postgres to scheduler;
However pgAgent refuses to execute any jobs, and just sits there idly. No error messages in logs. If I start pgagent as 'postgres' user it runs fine. Or, if I 'grant postgres to scheduler' it also runs fine.
What permissions am I missing here?