Skip to content

Commit c902109

Browse files
committed
minor fixes and changes to elog messages
1 parent e82ae6d commit c902109

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/backup.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -775,10 +775,10 @@ do_backup(time_t start_time)
775775
is_checksum_enabled = pg_checksum_enable();
776776

777777
if (is_checksum_enabled)
778-
elog(LOG, "This PostgreSQL instance initialized with data block checksums. "
778+
elog(LOG, "This PostgreSQL instance was initialized with data block checksums. "
779779
"Data block corruption will be detected");
780780
else
781-
elog(WARNING, "This PostgreSQL instance initialized without data block checksums. "
781+
elog(WARNING, "This PostgreSQL instance was initialized without data block checksums. "
782782
"pg_probackup have no way to detect data block corruption without them. "
783783
"Reinitialize PGDATA with option '--data-checksums'.");
784784

@@ -1870,7 +1870,7 @@ backup_cleanup(bool fatal, void *userdata)
18701870
*/
18711871
if (current.status == BACKUP_STATUS_RUNNING && current.end_time == 0)
18721872
{
1873-
elog(INFO, "Backup %s is running, setting its status to ERROR",
1873+
elog(WARNING, "Backup %s is running, setting its status to ERROR",
18741874
base36enc(current.start_time));
18751875
current.end_time = time(NULL);
18761876
current.status = BACKUP_STATUS_ERROR;
@@ -1882,7 +1882,7 @@ backup_cleanup(bool fatal, void *userdata)
18821882
*/
18831883
if (backup_in_progress)
18841884
{
1885-
elog(LOG, "backup in progress, stop backup");
1885+
elog(WARNING, "backup in progress, stop backup");
18861886
pg_stop_backup(NULL); /* don't care stop_lsn on error case */
18871887
}
18881888
}
@@ -2560,7 +2560,7 @@ stop_streaming(XLogRecPtr xlogpos, uint32 timeline, bool segment_finished)
25602560

25612561
/* we assume that we get called once at the end of each segment */
25622562
if (segment_finished)
2563-
elog(LOG, _("finished segment at %X/%X (timeline %u)\n"),
2563+
elog(LOG, _("finished streaming WAL at %X/%X (timeline %u)"),
25642564
(uint32) (xlogpos >> 32), (uint32) xlogpos, timeline);
25652565

25662566
/*
@@ -2664,7 +2664,7 @@ StreamLog(void *arg)
26642664
/*
26652665
* Start the replication
26662666
*/
2667-
elog(LOG, _("starting log streaming at %X/%X (timeline %u)\n"),
2667+
elog(LOG, _("started streaming WAL at %X/%X (timeline %u)"),
26682668
(uint32) (startpos >> 32), (uint32) startpos, starttli);
26692669

26702670
#if PG_VERSION_NUM >= 90600

src/utils/pgut.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,7 +1526,7 @@ pgut_execute_parallel(PGconn* conn,
15261526
elog(ERROR, "interrupted");
15271527

15281528
/* write query to elog if verbose */
1529-
if (LOG_LEVEL_CONSOLE <= LOG || LOG_LEVEL_FILE <= LOG)
1529+
if (LOG_LEVEL_CONSOLE <= VERBOSE || LOG_LEVEL_FILE <= VERBOSE)
15301530
{
15311531
int i;
15321532

@@ -1580,7 +1580,7 @@ pgut_execute(PGconn* conn, const char *query, int nParams, const char **params,
15801580
elog(ERROR, "interrupted");
15811581

15821582
/* write query to elog if verbose */
1583-
if (LOG_LEVEL_CONSOLE <= LOG || LOG_LEVEL_FILE <= LOG)
1583+
if (LOG_LEVEL_CONSOLE <= VERBOSE || LOG_LEVEL_FILE <= VERBOSE)
15841584
{
15851585
int i;
15861586

@@ -1634,16 +1634,16 @@ pgut_send(PGconn* conn, const char *query, int nParams, const char **params, int
16341634
elog(ERROR, "interrupted");
16351635

16361636
/* write query to elog if verbose */
1637-
if (LOG_LEVEL_CONSOLE <= LOG)
1637+
if (LOG_LEVEL_CONSOLE <= VERBOSE || LOG_LEVEL_FILE <= VERBOSE)
16381638
{
16391639
int i;
16401640

16411641
if (strchr(query, '\n'))
1642-
elog(LOG, "(query)\n%s", query);
1642+
elog(VERBOSE, "(query)\n%s", query);
16431643
else
1644-
elog(LOG, "(query) %s", query);
1644+
elog(VERBOSE, "(query) %s", query);
16451645
for (i = 0; i < nParams; i++)
1646-
elog(LOG, "\t(param:%d) = %s", i, params[i] ? params[i] : "(null)");
1646+
elog(VERBOSE, "\t(param:%d) = %s", i, params[i] ? params[i] : "(null)");
16471647
}
16481648

16491649
if (conn == NULL)

0 commit comments

Comments
 (0)