From c7349b281f56c6a7dc3a0108e5f757596159d8b3 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 19 Aug 2024 19:11:49 +0200 Subject: [PATCH] postgres_driver: some better logs --- .../driver/postgres_driver/postgres_driver.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/waku/waku_archive/driver/postgres_driver/postgres_driver.nim b/waku/waku_archive/driver/postgres_driver/postgres_driver.nim index 7e14751a3f..c15941b213 100644 --- a/waku/waku_archive/driver/postgres_driver/postgres_driver.nim +++ b/waku/waku_archive/driver/postgres_driver/postgres_driver.nim @@ -1527,22 +1527,22 @@ proc analyzeTableLoop(self: PostgresDriver) {.async.} = ## The database stats should be calculated regularly so that the planner ## picks up the proper indexes and we have better query performance. while true: - debug "analyzeTable lock db" + debug "analyzeTableLoop lock db" (await self.acquireDatabaseLock(AnalyzeTableLockId)).isOkOr: if error != EXPECTED_LOCK_ERROR: - error "failed to acquire lock in analyzeTable", error = error + error "failed to acquire lock in analyzeTableLoop", error = error await sleepAsync(RunAnalyzeInterval) continue - debug "analyzeTable start" + debug "analyzeTableLoop start analysis" (await self.performWriteQuery(AnalyzeQuery)).isOkOr: error "failed to run ANALYZE messages", error = error - debug "analyzeTable unlock db" + debug "analyzeTableLoop unlock db" (await self.releaseDatabaseLock(AnalyzeTableLockId)).isOkOr: - error "failed to release lock analyzeTable", error = error + error "failed to release lock analyzeTableLoop", error = error - debug "analyzeTable completed" + debug "analyzeTableLoop analysis completed" await sleepAsync(RunAnalyzeInterval)