pgsql: Extend sendFileWithContent() to handle custom content length in

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема pgsql: Extend sendFileWithContent() to handle custom content length in
Дата
Msg-id E1r2K0f-0059NV-I8@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Extend sendFileWithContent() to handle custom content length in  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-committers
Extend sendFileWithContent() to handle custom content length in basebackup.c

sendFileWithContent() previously got the content length by using
strlen(), assuming that the content given is always a string.  Some
patches are under discussion to pass binary contents to a base backup
stream, where an arbitrary length needs to be given by the caller
instead.

The patch extends sendFileWithContent() to be able to handle this case,
where len < 0 can be used to indicate an arbitrary length rather than
rely on strlen() for the content length.

A comment in sendFileWithContent() mentioned the backup_label file.
However, this routine is used by more file types, like the tablespace
map, so adjust it in passing.

Author: David Steele
Discussion: https://postgr.es/m/2daf8adc-8db7-4204-a7f2-a7e94e2bfa4b@pgmasters.net

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7606175991f8ed5ae36eecf6951cb89dcfb2156e

Modified Files
--------------
src/backend/backup/basebackup.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)


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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: pgsql: Add ability to reset all shared stats types in pg_stat_reset_sha
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: pgsql: Extend sendFileWithContent() to handle custom content length in