fix(restore): add 100ms delay between database restores
All checks were successful
CI/CD / Test (push) Successful in 1m19s
CI/CD / Lint (push) Successful in 1m27s
CI/CD / Build & Release (push) Successful in 3m17s

Ensures PostgreSQL fully closes connections before starting next
restore, preventing potential connection pool exhaustion during
rapid sequential cluster restores.
This commit is contained in:
2026-01-16 16:08:42 +01:00
parent b2a78cad2a
commit dd7c4da0eb

View File

@@ -1203,6 +1203,9 @@ func (e *Engine) RestoreCluster(ctx context.Context, archivePath string) error {
completedDBTimesMu.Unlock()
atomic.AddInt32(&successCount, 1)
// Small delay to ensure PostgreSQL fully closes connections before next restore
time.Sleep(100 * time.Millisecond)
}(dbIndex, entry.Name())
dbIndex++