postgrest icon indicating copy to clipboard operation
postgrest copied to clipboard

There's a typo in "default_transation_isolation" with a missing c

Open fjapm opened this issue 3 years ago • 3 comments

https://github.com/PostgREST/postgrest/blob/1b4dae5a7a48842880a7ed11b9a7b6487023e4ad/src/PostgREST/Config/Database.hs#L157

fjapm avatar Sep 20 '23 02:09 fjapm

Just checked and some tests turn red when correcting to 'default_transaction_isolation'. It's as if the filter is not doing anything, because when I remove it they pass without problem.

laurenceisla avatar Sep 21 '23 00:09 laurenceisla

Just checked and some tests turn red

@laurenceisla Which tests? Where there io tests or spec tests?

Edit: Nvm, already got the io tests failures.

steve-chavez avatar Sep 27 '23 19:09 steve-chavez

I guess this could be considered a minor bug. So that filter was meant to avoid setting default_transaction_isolation since it's pointless - it has to be done at the start of the transaction.

But currently:

alter role postgrest_test_anonymous set default_transaction_isolation to 'serializable';
$ curl localhost:3000/projects
BEGIN ISOLATION LEVEL SERIALIZABLE READ ONLY
2023-09-27 17:09:41.356 -03 [3364384] LOG:  execute 12: select set_config($1, $2, true), set_config($3, $4, true), set_config($5, $6, true), set_config($7, $8, true), set_config($9, $10, true)
, set_config($11, $12, true), set_config($13, $14, true), set_config($15, $16, true)
2023-09-27 17:09:41.356 -03 [3364384] DETAIL:  parameters: $1 = 'search_path', $2 = '"test", "public"', $3 = 'role', $4 = 'postgrest_test_anonymous', $5 = 'default_transaction_isolation', $6 =
 'serializable', $7 = 'request.jwt.claims', $8 = '{"role":"postgrest_test_anonymous"}', $9 = 'request.method', $10 = 'GET', $11 = 'request.path', $12 = '/projects', $13 = 'request.headers', $1
4 = '{"host":"localhost:3000","accept":"*/*","user-agent":"curl/7.81.0"}', $15 = 'request.cookies', $16 = '{}'

default_transaction_isolation='serializable' is being set anyway.

steve-chavez avatar Sep 27 '23 20:09 steve-chavez