Re: Using of --data-checksums

2020-04-11 Thread Michael Paquier
On Fri, Apr 10, 2020 at 04:37:46PM -0400, Stephen Frost wrote: > There's definitely a lot of reasons to want to have the ability to > change an existing cluster. Considering the complications around > running pg_upgrade already, I don't really think that changing the > default of initdb would be t

Re: Log Unique Queries without Params?

2020-04-11 Thread Julien Rouhaud
On Sun, Apr 12, 2020 at 6:51 AM Chris Morris wrote: > > I have a local script I've written that will scan a log of PG queries to > extract out unique queries without any specific parameter data. For example, > if these 2 queries are actually run: > > SELECT * FROM foo where bar = 1; > SELECT * F

Log Unique Queries without Params?

2020-04-11 Thread Chris Morris
I have a local script I've written that will scan a log of PG queries to extract out unique queries without any specific parameter data. For example, if these 2 queries are actually run: SELECT * FROM foo where bar = 1; SELECT * FROM foo where bar = 2; It will capture only: SELECT * FROM foo whe

Looping though schemas to grant access will work in PUBLIC loop iteration but fails on next iteration of user schema at: GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA

2020-04-11 Thread AC Gomez
In PostgreSQL 9.5: I have created a function that does the following: USER CREATE: 'CREATE USER user_x WITH PASSWORD 'abc' CREATEDB CREATEROLE;' WITH GRANT: 'GRANT master_user TO user_x;' GRANT CONNECT ON DATABASE my_db TO user_x LOOP THROUGH ALL USER SCHEMAS: OUTER LOOP: GRANT USAGE ON SC

Which commands are guaranteed to drop role

2020-04-11 Thread Andrus
Hi! Database "mydb" is owned by role "mydb_owner". User "currentuser" tries to delete role "roletodelete" from this database using revoke all on all tables in schema public,firma1 from "roletodelete" cascade; revoke all on all sequences in schema public,firma1 from "roletodelete" cascade; r