fix: misleading logs on unsupported postgresql versions
Postgrest fails on unsupported pg versions. However before killing
the thread, it continues to print a few more log messages which
were misleading. This commit fixes this by making sure that the
no log message should be printed after the unsupported pg version
observation and kill the thread immediately.
Signed-off-by: Taimoor Zaeem <taimoorzaeem@gmail.com>
(cherry picked from commit 0fa2f569a7)
This commit is contained in:
committed by
Steve Chavez
parent
f2b96b1d41
commit
d4b8109522
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. From versio
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix misleading logs on unsupported PostgreSQL versions by @taimoorzaeem in #4519
|
||||||
|
|
||||||
## [14.1] - 2025-11-05
|
## [14.1] - 2025-11-05
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|||||||
@@ -382,14 +382,16 @@ retryingSchemaCacheLoad appState@AppState{stateObserver=observer, stateMainThrea
|
|||||||
observer ExitDBNoRecoveryObs
|
observer ExitDBNoRecoveryObs
|
||||||
killThread mainThreadId
|
killThread mainThreadId
|
||||||
return Nothing
|
return Nothing
|
||||||
Right actualPgVersion -> do
|
Right actualPgVersion ->
|
||||||
when (actualPgVersion < minimumPgVersion) $ do
|
if actualPgVersion < minimumPgVersion then do
|
||||||
observer $ ExitUnsupportedPgVersion actualPgVersion minimumPgVersion
|
observer $ ExitUnsupportedPgVersion actualPgVersion minimumPgVersion
|
||||||
killThread mainThreadId
|
killThread mainThreadId
|
||||||
observer $ DBConnectedObs $ pgvFullName actualPgVersion
|
return Nothing
|
||||||
observer $ PoolInit configDbPoolSize
|
else do
|
||||||
putPgVersion appState actualPgVersion
|
observer $ DBConnectedObs $ pgvFullName actualPgVersion
|
||||||
return $ Just actualPgVersion
|
observer $ PoolInit configDbPoolSize
|
||||||
|
putPgVersion appState actualPgVersion
|
||||||
|
return $ Just actualPgVersion
|
||||||
|
|
||||||
qInDbConfig :: IO ()
|
qInDbConfig :: IO ()
|
||||||
qInDbConfig = do
|
qInDbConfig = do
|
||||||
|
|||||||
Reference in New Issue
Block a user