citusdata / pg_cron

Run periodic jobs in PostgreSQL
PostgreSQL License
2.89k stars 193 forks source link

pg_read_all_data cannot read cron.job table #353

Closed JamesInform closed 2 months ago

JamesInform commented 2 months ago

Maybe a dump question:

I have set up a new user on my system:

$ create user myreadall;

$ grand pg_read_all_data to myreadall;

Now when I change to that user and try to read cron.job table, it doesn't show any rows (although there are rows that I can see as a superuser):

$ set role to myradall;

$ select * from cron.job;
{empty result set}

Any idea?

JamesInform commented 2 months ago

Solved it by myself. PG_CRON uses row level security.

That was the reason!