mirror of
https://github.com/postgrespro/pg_probackup.git
synced 2024-11-24 08:52:38 +02:00
Remove noisy NOTICE messages when calling pg_stop_backup
Those per se are not that annoying, but the random messages generated by the backend while pg_arman is waiting for segments to be archived are annoying. This commit gets rid of them by using client_min_messages set to warning on the connection used. Report by Yury Zhuravlev.
This commit is contained in:
parent
06bd035c29
commit
558d4a3427
8
backup.c
8
backup.c
@ -94,7 +94,7 @@ do_backup_database(parray *backup_list, pgBackupOption bkupopt)
|
||||
if (pg_is_standby())
|
||||
elog(ERROR, "Backup cannot run on a standby.");
|
||||
|
||||
elog(INFO, "database backup start");
|
||||
elog(LOG, "database backup start");
|
||||
|
||||
/* Initialize size summary */
|
||||
current.data_bytes = 0;
|
||||
@ -563,6 +563,12 @@ wait_for_archive(pgBackup *backup, const char *sql)
|
||||
XLogSegNo targetSegNo;
|
||||
|
||||
reconnect();
|
||||
|
||||
/* Remove annoying NOTICE messages generated by backend */
|
||||
res = execute("SET client_min_messages = warning;", 0, NULL);
|
||||
PQclear(res);
|
||||
|
||||
/* And execute the query wanted */
|
||||
res = execute(sql, 0, NULL);
|
||||
|
||||
/* Get LSN from execution result */
|
||||
|
@ -1,19 +1,12 @@
|
||||
\! bash sql/delete.sh
|
||||
###### DELETE COMMAND TEST-0001 ######
|
||||
###### delete full backups ######
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
try to delete the oldest backup
|
||||
2
|
||||
1
|
||||
Number of deleted backups should be 1, is it so?: 1
|
||||
###### DELETE COMMAND TEST-0002 ######
|
||||
###### keep backups which are necessary for recovery ######
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
try to delete before third backup
|
||||
3
|
||||
1
|
||||
|
@ -1,7 +1,6 @@
|
||||
\! bash sql/show.sh
|
||||
###### SHOW COMMAND TEST-0001 ######
|
||||
###### Status DONE and OK ######
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
0
|
||||
OK: DONE status is shown properly.
|
||||
0
|
||||
@ -10,11 +9,9 @@ OK: OK status is shown properly.
|
||||
###### SHOW COMMAND TEST-0002 ######
|
||||
###### Status RUNNING ######
|
||||
OK: RUNNING status is shown properly.
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
|
||||
###### SHOW COMMAND TEST-0003 ######
|
||||
###### Status CORRUPT ######
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
0
|
||||
remove a file from backup intentionally
|
||||
0
|
||||
@ -22,10 +19,8 @@ OK: CORRUPT status is shown properly.
|
||||
|
||||
###### SHOW COMMAND TEST-0004 ######
|
||||
###### Status DELETED ######
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
0
|
||||
0
|
||||
NOTICE: pg_stop_backup complete, all required WAL segments have been archived
|
||||
0
|
||||
0
|
||||
0
|
||||
|
Loading…
Reference in New Issue
Block a user