@@ -15,25 +15,15 @@ PGTZ=UTC initdb --no-locale --encoding=UTF8 --nosync -U "$PGUSER"
15
15
# so we just modify the resulting postgresql.conf to avoid an error
16
16
echo " dynamic_library_path='\$ libdir:$( pwd) '" >> $PGDATA /postgresql.conf
17
17
echo " extension_control_path='\$ system:$( pwd) '" >> $PGDATA /postgresql.conf
18
+ echo " include 'init.conf'" >> $PGDATA /postgresql.conf
18
19
19
- options= " -F -c listen_addresses= \"\" -k $PGDATA -c shared_preload_libraries= \" supautils \" -c wal_level=logical -c cron.database_name=postgres "
20
+ cp ./test/init.conf $tmpdir /init.conf
20
21
21
- reserved_roles=" supabase_storage_admin, anon, reserved_but_not_yet_created, authenticator*"
22
- reserved_memberships=" pg_read_server_files, pg_write_server_files, pg_execute_server_program, role_with_reserved_membership"
23
- privileged_extensions=" autoinc, citext, hstore, sslinfo, insert_username, dict_xsyn, postgres_fdw, pageinspect"
24
- privileged_extensions_custom_scripts_path=" $tmpdir /privileged_extensions_custom_scripts"
25
- privileged_role=" privileged_role"
26
- privileged_role_allowed_configs=" session_replication_role, pgrst.*, other.nested.*"
22
+ sed -i " s|@TMPDIR@|$tmpdir |g" $tmpdir /init.conf
27
23
28
- reserved_stuff_options=" -c supautils.reserved_roles=\" $reserved_roles \" -c supautils.reserved_memberships=\" $reserved_memberships \" -c supautils.privileged_extensions=\" $privileged_extensions \" -c supautils.privileged_extensions_custom_scripts_path=\" $privileged_extensions_custom_scripts_path \" -c supautils.privileged_role=\" $privileged_role \" -c supautils.privileged_role_allowed_configs=\" $privileged_role_allowed_configs \" "
29
- placeholder_stuff_options=' -c supautils.placeholders="response.headers, another.placeholder" -c supautils.placeholders_disallowed_values="\"content-type\",\"x-special-header\",special-value"'
24
+ options=" -F -c listen_addresses=\"\" -k $PGDATA "
30
25
31
- cexts_option=' -c supautils.constrained_extensions="{\"adminpack\": { \"cpu\": 64}, \"cube\": { \"mem\": \"17 GB\"}, \"lo\": { \"disk\": \"100 GB\"}, \"amcheck\": { \"cpu\": 2, \"mem\": \"100 MB\", \"disk\": \"100 MB\"}}"'
32
- epos_option=' -c supautils.extensions_parameter_overrides="{\"sslinfo\":{\"schema\":\"pg_catalog\"}}"'
33
- drop_trigger_grants_option=' -c supautils.drop_trigger_grants="{\"privileged_role\":[\"allow_drop_triggers.my_table\"]}"'
34
- policy_grants_option=' -c supautils.policy_grants="{\"privileged_role\":[\"allow_policies.my_table\",\"allow_policies.nonexistent_table\"]}"'
35
-
36
- pg_ctl start -o " $options " -o " $reserved_stuff_options " -o " $placeholder_stuff_options " -o " $cexts_option " -o " $epos_option " -o " $drop_trigger_grants_option " -o " $policy_grants_option "
26
+ pg_ctl start -o " $options "
37
27
38
28
# print notice when creating a TLE
39
29
mkdir -p " $tmpdir /privileged_extensions_custom_scripts"
0 commit comments