summaryrefslogtreecommitdiff
path: root/src/backend/backup
diff options
context:
space:
mode:
authorMichael Paquier2022-09-27 00:15:07 +0000
committerMichael Paquier2022-09-27 00:15:07 +0000
commite1e6f8f3dfe141839220875270a81ad3a719e0b6 (patch)
treed3bed4b143fa09b7499bf5e1eb3fa150b7ceca00 /src/backend/backup
parent31d2c4716e6b429353bb81cebaa0f2b1267823d6 (diff)
Remove dependency to StringInfo in xlogbackup.{c.h}
This was used as the returned result type of the generated contents for the backup_label and backup history files. This is replaced by a simple string, reducing the cleanup burden of all the callers of build_backup_content(). Reviewed-by: Bharath Rupireddy Discussion: https://postgr.es/m/YzERvNPaZivHEKZJ@paquier.xyz
Diffstat (limited to 'src/backend/backup')
-rw-r--r--src/backend/backup/basebackup.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/backend/backup/basebackup.c b/src/backend/backup/basebackup.c
index 495bbb506a9..411cac9be3f 100644
--- a/src/backend/backup/basebackup.c
+++ b/src/backend/backup/basebackup.c
@@ -317,15 +317,14 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
{
struct stat statbuf;
bool sendtblspclinks = true;
- StringInfo backup_label;
+ char *backup_label;
bbsink_begin_archive(sink, "base.tar");
/* In the main tar, include the backup_label first... */
backup_label = build_backup_content(backup_state, false);
sendFileWithContent(sink, BACKUP_LABEL_FILE,
- backup_label->data, &manifest);
- pfree(backup_label->data);
+ backup_label, &manifest);
pfree(backup_label);
/* Then the tablespace_map file, if required... */