Skip to content

Commit cdcae2b

Browse files
committed
pg_rewind: Improve some messages
The output of a typical pg_rewind run contained a mix of capitalized and not-capitalized and punctuated and not-punctuated phrases for no apparent reason. Make that consistent. Also fix some problems in other messages.
1 parent 87c2b51 commit cdcae2b

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/bin/pg_rewind/file_ops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ truncate_target_file(const char *path, off_t newsize)
198198
dstpath, strerror(errno));
199199

200200
if (ftruncate(fd, newsize) != 0)
201-
pg_fatal("could not truncate file \"%s\" to %u bytes: %s\n",
201+
pg_fatal("could not truncate file \"%s\" to %u: %s\n",
202202
dstpath, (unsigned int) newsize, strerror(errno));
203203

204204
close(fd);

src/bin/pg_rewind/libpq_fetch.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ libpqGetCurrentXlogInsertLocation(void)
120120
val = run_simple_query("SELECT pg_current_xlog_insert_location()");
121121

122122
if (sscanf(val, "%X/%X", &hi, &lo) != 2)
123-
pg_fatal("unrecognized result \"%s\" for current XLOG insert location\n", val);
123+
pg_fatal("unrecognized result \"%s\" for current WAL insert location\n", val);
124124

125125
result = ((uint64) hi) << 32 | lo;
126126

@@ -248,7 +248,7 @@ receiveFileChunks(const char *sql)
248248
continue; /* final zero-row result */
249249

250250
default:
251-
pg_fatal("unexpected result while fetching remote files: %s\n",
251+
pg_fatal("unexpected result while fetching remote files: %s",
252252
PQresultErrorMessage(res));
253253
}
254254

@@ -300,7 +300,7 @@ receiveFileChunks(const char *sql)
300300
if (PQgetisnull(res, 0, 2))
301301
{
302302
pg_log(PG_DEBUG,
303-
"received NULL chunk for file \"%s\", file has been deleted\n",
303+
"received null value for chunk for file \"%s\", file has been deleted\n",
304304
filename);
305305
pg_free(filename);
306306
PQclear(res);

src/bin/pg_rewind/pg_rewind.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ main(int argc, char **argv)
215215
pg_fatal("source and target cluster are on the same timeline\n");
216216

217217
findCommonAncestorTimeline(&divergerec, &lastcommontli);
218-
printf(_("The servers diverged at WAL position %X/%X on timeline %u.\n"),
218+
printf(_("servers diverged at WAL position %X/%X on timeline %u\n"),
219219
(uint32) (divergerec >> 32), (uint32) divergerec, lastcommontli);
220220

221221
/*
@@ -250,13 +250,13 @@ main(int argc, char **argv)
250250

251251
if (!rewind_needed)
252252
{
253-
printf(_("No rewind required.\n"));
253+
printf(_("no rewind required\n"));
254254
exit(0);
255255
}
256256

257257
findLastCheckpoint(datadir_target, divergerec, lastcommontli,
258258
&chkptrec, &chkpttli, &chkptredo);
259-
printf(_("Rewinding from last common checkpoint at %X/%X on timeline %u\n"),
259+
printf(_("rewinding from last common checkpoint at %X/%X on timeline %u\n"),
260260
(uint32) (chkptrec >> 32), (uint32) chkptrec,
261261
chkpttli);
262262

src/bin/pg_rewind/timeline.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ rewind_parseTimeLineHistory(char *buffer, TimeLineID targetTLI, int *nentries)
8080
if (nfields != 3)
8181
{
8282
fprintf(stderr, _("syntax error in history file: %s\n"), fline);
83-
fprintf(stderr, _("Expected an XLOG switchpoint location.\n"));
83+
fprintf(stderr, _("Expected a transaction log switchpoint location.\n"));
8484
exit(1);
8585
}
8686
if (entries && tli <= lasttli)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy