pgsql: Ensure cleanup in case of early errors in streaming base backups

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема pgsql: Ensure cleanup in case of early errors in streaming base backups
Дата
Msg-id E1Wpbfo-0004Ec-1A@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/8232d6df4c943a30c08e65d7ea893cb762bc5612

Modified Files
--------------
src/backend/replication/basebackup.c |   29 ++++++++++++++++++-----------
1 file changed, 18 insertions(+), 11 deletions(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: pgsql: Ensure cleanup in case of early errors in streaming base backups
Следующее
От: Magnus Hagander
Дата:
Сообщение: pgsql: Ensure cleanup in case of early errors in streaming base backups