#include "postgres_fe.h"
#include "datapagemap.h"
+#include "logging.h"
struct datapagemap_iterator
{
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);
}
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);
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);
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));
}
}