fix: request failures when work_mem is set on a role
This commit is contained in:
committed by
Steve Chavez
parent
a149405d11
commit
416a15480f
@@ -8,11 +8,12 @@ CREATE ROLE postgrest_test_author;
|
||||
CREATE ROLE postgrest_test_serializable;
|
||||
CREATE ROLE postgrest_test_repeatable_read;
|
||||
CREATE ROLE postgrest_test_w_superuser_settings;
|
||||
CREATE ROLE postgrest_test_work_mem;
|
||||
|
||||
GRANT
|
||||
postgrest_test_anonymous, postgrest_test_author,
|
||||
postgrest_test_serializable, postgrest_test_repeatable_read,
|
||||
postgrest_test_w_superuser_settings TO :"PGUSER";
|
||||
postgrest_test_w_superuser_settings, postgrest_test_work_mem TO :"PGUSER";
|
||||
|
||||
ALTER ROLE :"PGUSER" SET pgrst.db_anon_role = 'postgrest_test_anonymous';
|
||||
ALTER ROLE postgrest_test_serializable SET default_transaction_isolation = 'serializable';
|
||||
@@ -23,3 +24,5 @@ ALTER ROLE postgrest_test_w_superuser_settings SET log_min_messages = 'fatal';
|
||||
|
||||
ALTER ROLE postgrest_test_anonymous SET statement_timeout TO '5s';
|
||||
ALTER ROLE postgrest_test_author SET statement_timeout TO '10s';
|
||||
|
||||
ALTER ROLE postgrest_test_work_mem SET work_mem TO '3MB';
|
||||
|
||||
@@ -265,3 +265,7 @@ create or replace function custom_vary_hdr() returns void as $$
|
||||
perform set_config('response.headers', '[{"Vary": "X-Test-Accept"}]', false);
|
||||
end
|
||||
$$ language plpgsql;
|
||||
|
||||
create or replace function get_work_mem() returns text as $$
|
||||
select current_setting('work_mem', true);
|
||||
$$ language sql;
|
||||
|
||||
Reference in New Issue
Block a user