pg_rewind: Improve internationalization
This is mostly cosmetic since two of the three changes are debug messages, and the third one is just a progress indicator. Author: Michaël Paquier
This commit is contained in:
parent
37732a2555
commit
cad3edef4f
@ -13,6 +13,7 @@
|
||||
#include "postgres_fe.h"
|
||||
|
||||
#include "datapagemap.h"
|
||||
#include "logging.h"
|
||||
|
||||
struct datapagemap_iterator
|
||||
{
|
||||
@ -120,7 +121,7 @@ datapagemap_print(datapagemap_t *map)
|
||||
|
||||
iter = datapagemap_iterate(map);
|
||||
while (datapagemap_next(iter, &blocknum))
|
||||
printf(" blk %u\n", blocknum);
|
||||
pg_log(PG_DEBUG, " block %u\n", blocknum);
|
||||
|
||||
pg_free(iter);
|
||||
}
|
||||
|
@ -531,7 +531,11 @@ print_filemap(void)
|
||||
if (entry->action != FILE_ACTION_NONE ||
|
||||
entry->pagemap.bitmapsize > 0)
|
||||
{
|
||||
printf("%s (%s)\n", entry->path, action_to_str(entry->action));
|
||||
pg_log(PG_DEBUG,
|
||||
/*------
|
||||
translator: first %s is a file path, second is a keyword such as COPY */
|
||||
"%s (%s)\n", entry->path,
|
||||
action_to_str(entry->action));
|
||||
|
||||
if (entry->pagemap.bitmapsize > 0)
|
||||
datapagemap_print(&entry->pagemap);
|
||||
|
@ -470,9 +470,9 @@ getTimelineHistory(ControlFileData *controlFile, int *nentries)
|
||||
int i;
|
||||
|
||||
if (controlFile == &ControlFile_source)
|
||||
printf("Source timeline history:\n");
|
||||
pg_log(PG_DEBUG, "Source timeline history:\n");
|
||||
else if (controlFile == &ControlFile_target)
|
||||
printf("Target timeline history:\n");
|
||||
pg_log(PG_DEBUG, "Target timeline history:\n");
|
||||
else
|
||||
Assert(false);
|
||||
|
||||
@ -484,9 +484,11 @@ getTimelineHistory(ControlFileData *controlFile, int *nentries)
|
||||
TimeLineHistoryEntry *entry;
|
||||
|
||||
entry = &history[i];
|
||||
printf("%d: %X/%X - %X/%X\n", entry->tli,
|
||||
(uint32) (entry->begin >> 32), (uint32) (entry->begin),
|
||||
(uint32) (entry->end >> 32), (uint32) (entry->end));
|
||||
pg_log(PG_DEBUG,
|
||||
/* translator: %d is a timeline number, others are LSN positions */
|
||||
"%d: %X/%X - %X/%X\n", entry->tli,
|
||||
(uint32) (entry->begin >> 32), (uint32) (entry->begin),
|
||||
(uint32) (entry->end >> 32), (uint32) (entry->end));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user