Hi, I am trying to schedule pg_cron to generate a set of commands and then run them. E.gselect 'vacuum freeze '||table_name from inventory_for_vacuum \gexec
. This works well at command line, but when scheduled in pg_cron, it fails with syntax errorERROR: syntax error at or near "\"
.
Since vacuum doesn't work inside a transaction blockERROR: VACUUM cannot run inside a transaction block
, I cannot use a function directly to run over a loop.
Any guidance to make it work or an alternative?
What about running the command from regular cron?
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.