add: config db-timezone-enabled for optional querying of timezones
To avoid repeated querying of `pg_timezone_names` every time schema cache is reset, `Prefer: timezone` can be disabled by setting `db-timezone-enabled = false`. Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
This commit is contained in:
committed by
Steve Chavez
parent
bd5de884fa
commit
d6c338d588
@@ -132,6 +132,7 @@ baseCfg = let secret = encodeUtf8 "reallyreallyreallyreallyverysafe" in
|
||||
, configDbSchemas = fromList ["test"]
|
||||
, configDbConfig = False
|
||||
, configDbPreConfig = Nothing
|
||||
, configDbTimezoneEnabled = True
|
||||
, configDbUri = "postgresql://"
|
||||
, configFilePath = Nothing
|
||||
, configJWKS = rightToMaybe $ parseSecret secret
|
||||
@@ -254,6 +255,9 @@ testCfgServerTiming = baseCfg { configDbPlanEnabled = True }
|
||||
testCfgAggregatesEnabled :: AppConfig
|
||||
testCfgAggregatesEnabled = baseCfg { configDbAggregates = True }
|
||||
|
||||
testCfgTimezoneDisabled :: AppConfig
|
||||
testCfgTimezoneDisabled = baseCfg { configDbTimezoneEnabled = False }
|
||||
|
||||
analyzeTable :: Text -> IO ()
|
||||
analyzeTable tableName =
|
||||
void $ readProcess "psql" ["-U", "postgres", "--set", "ON_ERROR_STOP=1", "-a", "-c", toS $ "ANALYZE test.\"" <> tableName <> "\""] []
|
||||
|
||||
Reference in New Issue
Block a user