From dcfeb04eff6e25c250059487c87b582a8922969d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 Oct 2020 09:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9=EF=BC=9A?= =?UTF-8?q?=201.=E4=BF=AE=E5=A4=8Dgs=5Fbasebackup=E6=8C=87=E5=AE=9A-P?= =?UTF-8?q?=E6=97=B6=E6=97=A5=E5=BF=97=E4=BC=9A=E6=9C=89=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E5=AD=97=E7=AC=A6=E7=9A=84=E9=97=AE=E9=A2=98=202.=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dgs=5Fprobackup=E6=8C=87=E5=AE=9A=E9=9D=9E=E7=A9=BA?= =?UTF-8?q?=E7=9B=AE=E5=BD=95=E4=B9=9F=E8=83=BDinit=E6=88=90=E5=8A=9F?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=203.=E4=BF=AE=E5=A4=8Dgs=5Fprobacku?= =?UTF-8?q?p=E5=A4=87=E4=BB=BD=E8=A1=A8=E7=A9=BA=E9=97=B4=E5=90=8E?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E5=86=8D=E6=AC=A1=E5=A4=87=E4=BB=BD=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/pg_basebackup/receivelog.cpp | 6 ++++++ src/bin/pg_probackup/init.cpp | 2 +- src/gausskernel/storage/access/transam/xlog.cpp | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/bin/pg_basebackup/receivelog.cpp b/src/bin/pg_basebackup/receivelog.cpp index 9e502ece2..e880f107e 100644 --- a/src/bin/pg_basebackup/receivelog.cpp +++ b/src/bin/pg_basebackup/receivelog.cpp @@ -586,6 +586,8 @@ bool ReceiveXlogStream(PGconn* conn, XLogRecPtr startpos, uint32 timeline, const PQclear(res); } + fprintf(stderr, "%100s", ""); + fprintf(stderr, "\r"); pg_log(PG_PROGRESS, _(" check identify system success\n")); /* Initiate the replication stream at specified location */ @@ -605,6 +607,8 @@ bool ReceiveXlogStream(PGconn* conn, XLogRecPtr startpos, uint32 timeline, const } PQclear(res); + fprintf(stderr, "%100s", ""); + fprintf(stderr, "\r"); pg_log(PG_PROGRESS, _(" send %s success\n"), query); /* Set the last reply timestamp */ last_recv_timestamp = localGetCurrentTimestamp(); @@ -729,6 +733,8 @@ bool ReceiveXlogStream(PGconn* conn, XLogRecPtr startpos, uint32 timeline, const pg_log(PG_WARNING, _(" keepalive message is incorrect size: %d\n"), r); goto error; } + fprintf(stderr, "%100s", ""); + fprintf(stderr, "\r"); pg_log(PG_PRINT, _(" keepalive message is received\n")); /* copy the received buffer to keepalive */ ret = memcpy_s(&keepalive, sizeof(PrimaryKeepaliveMessage), copybuf + 1, sizeof(PrimaryKeepaliveMessage)); diff --git a/src/bin/pg_probackup/init.cpp b/src/bin/pg_probackup/init.cpp index 431ea3b70..a211152e1 100644 --- a/src/bin/pg_probackup/init.cpp +++ b/src/bin/pg_probackup/init.cpp @@ -24,7 +24,7 @@ do_init(void) int results; results = pg_check_dir(backup_path); - if (results == 4) /* exists and not empty*/ + if (results == 2) /* exists and not empty*/ elog(ERROR, "backup catalog already exist and it's not empty"); else if (results == -1) /*trouble accessing directory*/ { diff --git a/src/gausskernel/storage/access/transam/xlog.cpp b/src/gausskernel/storage/access/transam/xlog.cpp index 7dc290a70..52a9adba0 100755 --- a/src/gausskernel/storage/access/transam/xlog.cpp +++ b/src/gausskernel/storage/access/transam/xlog.cpp @@ -12402,6 +12402,7 @@ XLogRecPtr do_pg_start_backup(const char* backupidstr, bool fast, char** labelfi } pfree(labelfbuf.data); +#ifdef ENABLE_MULTIPLE_NODES /* Write backup tablespace_map file. */ if (tblspc_mapfbuf.len > 0) { if (stat(TABLESPACE_MAP, &stat_buf) != 0) { @@ -12425,6 +12426,7 @@ XLogRecPtr do_pg_start_backup(const char* backupidstr, bool fast, char** labelfi ereport( ERROR, (errcode_for_file_access(), errmsg("could not write file \"%s\": %m", TABLESPACE_MAP))); } +#endif pfree(tblspc_mapfbuf.data); } else { *labelfile = labelfbuf.data;