#include "nodes/replnodes.h"

Go to the source code of this file.
Functions | |
| void | SendBaseBackup (BaseBackupCmd *cmd) |
| void SendBaseBackup | ( | BaseBackupCmd * | cmd | ) |
Definition at line 527 of file basebackup.c.
References AllocateDir(), ereport, errmsg(), ERROR, FreeDir(), basebackup_options::label, BaseBackupCmd::options, parse_basebackup_options(), perform_base_backup(), set_ps_display(), snprintf(), update_process_title, WalSndSetState(), and WALSNDSTATE_BACKUP.
Referenced by exec_replication_command().
{
DIR *dir;
basebackup_options opt;
parse_basebackup_options(cmd->options, &opt);
WalSndSetState(WALSNDSTATE_BACKUP);
if (update_process_title)
{
char activitymsg[50];
snprintf(activitymsg, sizeof(activitymsg), "sending backup \"%s\"",
opt.label);
set_ps_display(activitymsg, false);
}
/* Make sure we can open the directory with tablespaces in it */
dir = AllocateDir("pg_tblspc");
if (!dir)
ereport(ERROR,
(errmsg("could not open directory \"%s\": %m", "pg_tblspc")));
perform_base_backup(&opt, dir);
FreeDir(dir);
}
1.7.1