Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ All notable changes to this project will be documented in this file. From versio
- Shutdown should wait for in flight requests by @mkleczek in #4702
- Remove automatic transaction retries on `40001 (serialization_failure)` errors to prevent replication lag by @laurenceisla in #3673
- Fix unexpected results when embedding and filtering the same table more than once by @laurenceisla in #4075
- PostgREST no longer returns voids schema cache during loading retries by @mkleczek in #4873 #4869
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be more user facing, currently it mentions an implementation detail. Maybe:

Suggested change
- PostgREST no longer returns voids schema cache during loading retries by @mkleczek in #4873 #4869
- If the schema cache fails to reload, PostgREST will no longer stop serving requests and will continue doing so in a "best effort" basic by @mkleczek in #4873 #4869


### Changed

Expand Down
1 change: 0 additions & 1 deletion src/PostgREST/AppState.hs
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ retryingSchemaCacheLoad appState@AppState{stateObserver=observer, stateMainThrea
case result of
Left e -> do
markSchemaCachePending appState
putSchemaCache appState Nothing
observer $ SchemaCacheErrorObs configDbSchemas configDbExtraSearchPath e
return Nothing

Expand Down
2 changes: 2 additions & 0 deletions test/io/fixtures/roles.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ GRANT
postgrest_test_serializable, postgrest_test_repeatable_read,
postgrest_test_w_superuser_settings TO :"PGUSER";

GRANT postgrest_test_anonymous TO timeout_authenticator;
Comment thread
wolfgangwalther marked this conversation as resolved.

ALTER ROLE :"PGUSER" SET pgrst.db_anon_role = 'postgrest_test_anonymous';
ALTER ROLE postgrest_test_serializable SET default_transaction_isolation = 'serializable';
ALTER ROLE postgrest_test_repeatable_read SET default_transaction_isolation = 'REPEATABLE READ';
Expand Down
4 changes: 2 additions & 2 deletions test/io/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ def test_admin_ready_includes_schema_cache_state(defaultenv, metapostgrest):
env = {
**defaultenv,
"PGUSER": role,
"PGRST_DB_ANON_ROLE": role,
"PGRST_DB_ANON_ROLE": "postgrest_test_anonymous",
Comment thread
wolfgangwalther marked this conversation as resolved.
"PGRST_INTERNAL_SCHEMA_CACHE_QUERY_SLEEP": "500",
}

Expand All @@ -763,7 +763,7 @@ def test_admin_ready_includes_schema_cache_state(defaultenv, metapostgrest):
assert response.status_code == 503

response = postgrest.session.get("/projects", timeout=1)
assert response.status_code == 503
assert response.status_code == 200

reset_statement_timeout(metapostgrest, role)

Expand Down