Revert "add: config db-timezone-enabled for optional querying of timezones"

This reverts commit d6c338d588.
This commit is contained in:
steve-chavez
2026-08-04 13:41:40 -05:00
committed by Steve Chavez
parent ca4a6d9e99
commit a41396c425
23 changed files with 8 additions and 91 deletions
-1
View File
@@ -22,7 +22,6 @@ db-pre-request = "check_alias"
db-prepared-statements = true
db-root-spec = "open_alias"
db-schemas = "provided_through_alias"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
@@ -22,7 +22,6 @@ db-pre-request = ""
db-prepared-statements = false
db-root-spec = ""
db-schemas = "public"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
@@ -22,7 +22,6 @@ db-pre-request = ""
db-prepared-statements = false
db-root-spec = ""
db-schemas = "public"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
-1
View File
@@ -22,7 +22,6 @@ db-pre-request = ""
db-prepared-statements = true
db-root-spec = ""
db-schemas = "public"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
@@ -24,7 +24,6 @@ db-pre-request = "test.other_custom_headers"
db-prepared-statements = false
db-root-spec = "other_root"
db-schemas = "test,other_tenant1,other_tenant2"
db-timezone-enabled = false
db-tx-end = "rollback-allow-override"
db-uri = "postgresql://"
jwt-aud = "https://otherexample.org"
@@ -24,7 +24,6 @@ db-pre-request = "test.custom_headers"
db-prepared-statements = false
db-root-spec = "root"
db-schemas = "test,tenant1,tenant2"
db-timezone-enabled = false
db-tx-end = "commit-allow-override"
db-uri = "postgresql://"
jwt-aud = "https://example.org"
@@ -24,7 +24,6 @@ db-pre-request = "please_run_fast"
db-prepared-statements = false
db-root-spec = "openapi_v3"
db-schemas = "multi,tenant,setup"
db-timezone-enabled = false
db-tx-end = "rollback-allow-override"
db-uri = "tmp_db"
jwt-aud = "https://postgrest.org"
-1
View File
@@ -23,7 +23,6 @@ db-pre-request = ""
db-prepared-statements = true
db-root-spec = ""
db-schemas = "public"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
-1
View File
@@ -22,7 +22,6 @@ db-pre-request = ""
db-prepared-statements = true
db-root-spec = ""
db-schemas = "public"
db-timezone-enabled = true
db-tx-end = "commit"
db-uri = "postgresql://"
jwt-aud = ""
-1
View File
@@ -20,7 +20,6 @@ PGRST_DB_ROOT_SPEC: openapi_v3
PGRST_DB_SCHEMAS: multi, tenant,setup
PGRST_DB_CONFIG: false
PGRST_DB_PRE_CONFIG: "postgrest.pre_config"
PGRST_DB_TIMEZONE_ENABLED: false
PGRST_DB_TX_END: rollback-allow-override
PGRST_DB_URI: tmp_db
PGRST_DB_USE_LEGACY_GUCS: false
-1
View File
@@ -18,7 +18,6 @@ db-root-spec = "openapi_v3"
db-schemas = "multi, tenant,setup"
db-config = false
db-pre-config = "postgrest.pre_config"
db-timezone-enabled = false
db-tx-end = "rollback-allow-override"
db-uri = "tmp_db"
jwt-aud = "https://postgrest.org"
-2
View File
@@ -13,7 +13,6 @@ ALTER ROLE db_config_authenticator SET pgrst.db_pre_request = 'test.custom_heade
ALTER ROLE db_config_authenticator SET pgrst.db_prepared_statements = 'false';
ALTER ROLE db_config_authenticator SET pgrst.db_root_spec = 'root';
ALTER ROLE db_config_authenticator SET pgrst.db_schemas = 'test, tenant1, tenant2';
ALTER ROLE db_config_authenticator SET pgrst.db_timezone_enabled = 'false';
ALTER ROLE db_config_authenticator SET pgrst.db_tx_end = 'commit-allow-override';
ALTER ROLE db_config_authenticator SET pgrst.jwt_aud = 'https://example.org';
ALTER ROLE db_config_authenticator SET pgrst.jwt_cache_max_entries = '86400';
@@ -71,7 +70,6 @@ ALTER ROLE other_authenticator SET pgrst.db_pre_request = 'test.other_custom_hea
ALTER ROLE other_authenticator SET pgrst.db_prepared_statements = 'false';
ALTER ROLE other_authenticator SET pgrst.db_root_spec = 'other_root';
ALTER ROLE other_authenticator SET pgrst.db_schemas = 'test, other_tenant1, other_tenant2';
ALTER ROLE other_authenticator SET pgrst.db_timezone_enabled = 'false';
ALTER ROLE other_authenticator SET pgrst.jwt_aud = 'https://otherexample.org';
ALTER ROLE other_authenticator SET pgrst.jwt_secret = 'ODERREALLYREALLYREALLYREALLYVERYSAFE';
ALTER ROLE other_authenticator SET pgrst.jwt_secret_is_base64 = 'false';
+2 -8
View File
@@ -994,16 +994,13 @@ def test_schema_cache_query_sleep_logs(defaultenv):
assert 1000 < observed_ms < 2000
@pytest.mark.parametrize("timezone_enabled", ["true", "false"])
@pytest.mark.parametrize("level", ["crit", "error", "warn", "info", "debug"])
def test_schema_cache_query_timings_log(level, timezone_enabled, defaultenv):
def test_schema_cache_query_timings_log(level, defaultenv):
"Schema cache query timings should be logged on log-level=debug."
env = {
**defaultenv,
"PGRST_LOG_LEVEL": level,
# when this is disabled, it should log 0 for tzones
"PGRST_DB_TIMEZONE_ENABLED": timezone_enabled,
}
# here we also capture the tzones: <value> ms
log_pattern = re.compile(
@@ -1018,10 +1015,7 @@ def test_schema_cache_query_timings_log(level, timezone_enabled, defaultenv):
if level == "debug":
assert len(timing_matches) == 1
if timezone_enabled == "false":
assert float(timing_matches[0].group(1)) == 0
else:
assert float(timing_matches[0].group(1)) > 0
assert float(timing_matches[0].group(1)) > 0
else:
assert not timing_matches