aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/jsonb_util.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2014-05-28 12:40:45 +0200
committerMagnus Hagander <magnus@hagander.net>2014-05-28 12:43:29 +0200
commit8232d6df4c943a30c08e65d7ea893cb762bc5612 (patch)
treebd6db015a83e5437522adb9dc19369b1f52fdf5f /src/backend/utils/adt/jsonb_util.c
parentc676315658973390c5550d73d3bb1fb7b92720b5 (diff)
downloadpostgresql-8232d6df4c943a30c08e65d7ea893cb762bc5612.tar.gz
postgresql-8232d6df4c943a30c08e65d7ea893cb762bc5612.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) or if the psprintf calls ran out of memory. Both are very low risk, but all operations after do_pg_start_backup should be protected.
Diffstat (limited to 'src/backend/utils/adt/jsonb_util.c')
0 files changed, 0 insertions, 0 deletions