PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
23.47k stars 1.03k forks source link

fix: schema cache loading before the in-db config #3670

Closed steve-chavez closed 3 months ago

steve-chavez commented 3 months ago

Fixes #3660. Load the in-db config before the schema cache.

The regression happened on f09655b.

steve-chavez commented 3 months ago

One test is failing after this change:

$ postgrest-test-io -vv -k test_get_granted_superuser_setting
laurenceisla commented 3 months ago

One test is failing after this change:

$ postgrest-test-io -vv -k test_get_granted_superuser_setting

Since the in-db config needs the PostgreSQL version to load the in-db role settings. So it has to be queried after the PG Version and before the Schema Cache.

I tried a fix here: https://github.com/steve-chavez/postgrest/pull/9

wolfgangwalther commented 3 months ago

I backported this commit to the v12 branch. You might want to add a changelog entry in the release commit.