aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2014-05-28 13:00:09 +0200
committerMagnus Hagander <magnus@hagander.net>2014-05-28 13:00:09 +0200
commit433cacfc0f1bf245a13df60da4bded02c5b61165 (patch)
tree3ff3336328b8f71c105ebd25ce8d14a12222509f /src/backend/tcop/postgres.c
parentb8cf89c041d0789d9353a2875a1041c77429037c (diff)
downloadpostgresql-433cacfc0f1bf245a13df60da4bded02c5b61165.tar.gz
postgresql-433cacfc0f1bf245a13df60da4bded02c5b61165.zip
Ensure cleanup in case of early errors in streaming base backups
Move the code that sends the initial status information as well as the calculation of paths inside the ENSURE_ERROR_CLEANUP block. If this code failed, we would "leak" a counter of number of concurrent backups, thereby making the system always believe it was in backup mode. This could happen if the sending failed (which it probably never did given that the small amount of data to send would never cause a flush). It is very low risk, but all operations after do_pg_start_backup should be protected.
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions