Commit 50f0980
fix: prevent leaking connection when snapshot backup fail (cloudnative-pg#6879)
The instance manager allocates a PostgreSQL connection every time a
volume snapshot backup need to be taken and then runs
`pg_backup_start` on it. That connection will stay up until the backup
is done.
If the snapshotting process fails, the backup will be marked as failed
but the connection won't be closed.
This patch ensures that a successive backup is able to proceed correctly
by closing the previous connection.
A successive commit will allow the operator to close that stale commit
even when there's no successive backup.
Partially closes cloudnative-pg#6761
Signed-off-by: Leonardo Cecchi <leonardo.cecchi@enterprisedb.com>
Signed-off-by: Armando Ruocco <armando.ruocco@enterprisedb.com>
Co-authored-by: Armando Ruocco <armando.ruocco@enterprisedb.com>1 parent fee1bc5 commit 50f0980
File tree
2 files changed
+11
-1
lines changed- pkg/management/postgres/webserver
2 files changed
+11
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
281 | 284 | | |
282 | 285 | | |
283 | 286 | | |
| |||
0 commit comments