pg_cron for vacuum - dynamic table set

2022-02-03 Thread saket bansal
Hi, I am trying to schedule pg_cron to generate a set of commands and then run them. E.g select '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 error ERROR: syntax error at or near "\" . Since

Noinheritance with superuser

2021-06-03 Thread saket bansal
I have an RDS instance with the below configuration. create role role1 login noinheritance; grant rds_superuser to rdsdba; grant rdsdba to role1 In this case role1 is able to do all administrative operations, without the need of switching to rdsdba. Is this expected? I do not find any document

Re: Query with correlated join having slow performance

2019-12-09 Thread saket bansal
Thank you Michael. I re-wrote it and it does perform well. Modified query at: https://github.com/bansalsaket/PG_correlated_subquery_slowness/blob/master/Modified%20query%20-%20performs%20faster.txt Our app team is checking with their vendor whether this can be modified at source code level or

Re: Query with correlated join having slow performance

2019-12-09 Thread saket bansal
OR (status_typ_dbky = 20) > ) > ) > > I can not see the difference between above/below the AND other than the > order of operations... > > > > On Mon, Dec 9, 2019 at 1:33 PM saket bansal wrote: > >> Hi Postgres Experts, >> >> Please he