If you want to create a new database with postgis enabled on the server that have pgaudit enabled it will rise this error:
"pq: PostGIS installation stopped: pgaudit.log is set to 'ddl'. Set pgaudit.log to 'none' before installing PostGIS. You may re-enable pgaudit after installation is complete."
The problem is that operator "is fine" with it saying that all is good, but it should also mark object as "failed to configure".
As simple solution that I could propose would be to check extension name before running create extension here:
https://github.com/movetokube/postgres-operator/blob/master/pkg/postgres/database.go#L91
And run it this way:
SET pgaudit.log = 'none';
CREATE EXTENSION IF NOT EXISTS "postgis";
This should disable pgadmin only for this session, so it's safe to use this way
I was no tracing which user is used to create extensions, but "set" command required superadmin permissions.
If you want to create a new database with postgis enabled on the server that have pgaudit enabled it will rise this error:
The problem is that operator "is fine" with it saying that all is good, but it should also mark object as "failed to configure".
As simple solution that I could propose would be to check extension name before running create extension here:
https://github.com/movetokube/postgres-operator/blob/master/pkg/postgres/database.go#L91
And run it this way:
This should disable pgadmin only for this session, so it's safe to use this way
I was no tracing which user is used to create extensions, but "set" command required superadmin permissions.