Skip to content

Commit 59d6519

Browse files
encimasoedirgo
andauthored
Feat: add track_functions to supautils allowed calls (#1950)
* add track_functions to supautils allowed calls * Update enable_tracking.sql Co-authored-by: Bobbie Soedirgo <[email protected]> * chore: update snapshots * fix whitespace in tests --------- Co-authored-by: Bobbie Soedirgo <[email protected]> Co-authored-by: Bobbie Soedirgo <[email protected]>
1 parent 5c18ef5 commit 59d6519

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

ansible/files/postgresql_config/supautils.conf.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ supautils.privileged_extensions = 'address_standardizer, address_standardizer_da
1010
supautils.extension_custom_scripts_path = '/etc/postgresql-custom/extension-custom-scripts'
1111
supautils.privileged_extensions_superuser = 'supabase_admin'
1212
supautils.privileged_role = 'postgres'
13-
supautils.privileged_role_allowed_configs = 'auto_explain.*, log_lock_waits, log_min_duration_statement, log_min_messages, log_parameter_max_length, log_replication_commands, log_statement, log_temp_files, pg_net.batch_size, pg_net.ttl, pg_stat_statements.*, pgaudit.log, pgaudit.log_catalog, pgaudit.log_client, pgaudit.log_level, pgaudit.log_relation, pgaudit.log_rows, pgaudit.log_statement, pgaudit.log_statement_once, pgaudit.role, pgrst.*, plan_filter.*, safeupdate.enabled, session_replication_role, track_io_timing, wal_compression'
13+
supautils.privileged_role_allowed_configs = 'auto_explain.*, log_lock_waits, log_min_duration_statement, log_min_messages, log_parameter_max_length, log_replication_commands, log_statement, log_temp_files, pg_net.batch_size, pg_net.ttl, pg_stat_statements.*, pgaudit.log, pgaudit.log_catalog, pgaudit.log_client, pgaudit.log_level, pgaudit.log_relation, pgaudit.log_rows, pgaudit.log_statement, pgaudit.log_statement_once, pgaudit.role, pgrst.*, plan_filter.*, safeupdate.enabled, session_replication_role, track_functions, track_io_timing, wal_compression'
1414
supautils.reserved_memberships = 'pg_read_server_files, pg_write_server_files, pg_execute_server_program, supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, supabase_etl_admin, dashboard_user, pgbouncer, authenticator'
1515
supautils.reserved_roles = 'supabase_admin, supabase_auth_admin, supabase_storage_admin, supabase_read_only_user, supabase_realtime_admin, supabase_replication_admin, supabase_etl_admin, dashboard_user, pgbouncer, service_role*, authenticator*, authenticated*, anon*'
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
alter role postgres set track_functions = 'pl';
2+
alter role postgres set track_io_timing = on;
3+
alter role postgres reset track_functions;
4+
alter role postgres reset track_io_timing;

nix/tests/sql/enable_tracking.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
alter role postgres set track_functions = 'pl';
2+
alter role postgres set track_io_timing = on;
3+
4+
alter role postgres reset track_functions;
5+
alter role postgres reset track_io_timing;

0 commit comments

Comments
 (0)