mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Set process title to indicate base backup is running
This commit is contained in:
@ -29,6 +29,7 @@
|
|||||||
#include "utils/builtins.h"
|
#include "utils/builtins.h"
|
||||||
#include "utils/elog.h"
|
#include "utils/elog.h"
|
||||||
#include "utils/memutils.h"
|
#include "utils/memutils.h"
|
||||||
|
#include "utils/ps_status.h"
|
||||||
|
|
||||||
static int64 sendDir(char *path, int basepathlen, bool sizeonly);
|
static int64 sendDir(char *path, int basepathlen, bool sizeonly);
|
||||||
static void sendFile(char *path, int basepathlen, struct stat * statbuf);
|
static void sendFile(char *path, int basepathlen, struct stat * statbuf);
|
||||||
@ -96,6 +97,15 @@ SendBaseBackup(const char *options)
|
|||||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||||
errmsg("invalid base backup options: %s", options)));
|
errmsg("invalid base backup options: %s", options)));
|
||||||
|
|
||||||
|
if (update_process_title)
|
||||||
|
{
|
||||||
|
char activitymsg[50];
|
||||||
|
|
||||||
|
snprintf(activitymsg, sizeof(activitymsg), "sending backup \"%s\"",
|
||||||
|
backup_label);
|
||||||
|
set_ps_display(activitymsg, false);
|
||||||
|
}
|
||||||
|
|
||||||
/* Make sure we can open the directory with tablespaces in it */
|
/* Make sure we can open the directory with tablespaces in it */
|
||||||
dir = AllocateDir("pg_tblspc");
|
dir = AllocateDir("pg_tblspc");
|
||||||
if (!dir)
|
if (!dir)
|
||||||
|
Reference in New Issue
Block a user