1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-15 05:46:52 +03:00

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
This commit is contained in:
Michael Paquier
2022-09-27 09:15:07 +09:00
parent 31d2c4716e
commit e1e6f8f3df
5 changed files with 15 additions and 15 deletions

View File

@@ -8711,7 +8711,7 @@ do_pg_backup_stop(BackupState *state, bool waitforarchive)
}
else
{
StringInfo history_file;
char *history_file;
/*
* Write the backup-end xlog record
@@ -8751,8 +8751,7 @@ do_pg_backup_stop(BackupState *state, bool waitforarchive)
/* Build and save the contents of the backup history file */
history_file = build_backup_content(state, true);
fprintf(fp, "%s", history_file->data);
pfree(history_file->data);
fprintf(fp, "%s", history_file);
pfree(history_file);
if (fflush(fp) || ferror(fp) || FreeFile(fp))