more verbose logging for tli history checks

This commit is contained in:
Mikhail A. Kulagin
2021-12-22 09:15:17 +03:00
parent 9623b0af6e
commit 9d6477c87e
3 changed files with 8 additions and 0 deletions
+2
View File
@@ -203,6 +203,8 @@ catchup_preflight_checks(PGNodeInfo *source_node_info, PGconn *source_conn,
/* fill dest_redo.lsn and dest_redo.tli */
get_redo(dest_pgdata, FIO_LOCAL_HOST, &dest_redo);
elog(VERBOSE, "source.tli = %X, dest_redo.lsn = %X/%X, dest_redo.tli = %X",
current.tli, (uint32) (dest_redo.lsn >> 32), (uint32) dest_redo.lsn, dest_redo.tli);
if (current.tli != 1)
{
+4
View File
@@ -1821,11 +1821,15 @@ satisfy_timeline(const parray *timelines, TimeLineID tli, XLogRecPtr lsn)
{
int i;
elog(VERBOSE, "satisfy_timeline() checking: tli = %X, lsn = %X/%X",
tli, (uint32) (lsn >> 32), (uint32) lsn);
for (i = 0; i < parray_num(timelines); i++)
{
TimeLineHistoryEntry *timeline;
timeline = (TimeLineHistoryEntry *) parray_get(timelines, i);
elog(VERBOSE, "satisfy_timeline() check %i entry: timeline->tli = %X, timeline->end = %X/%X",
i, timeline->tli, (uint32) (timeline->end >> 32), (uint32) timeline->end);
if (tli == timeline->tli &&
(XLogRecPtrIsInvalid(timeline->end) ||
lsn <= timeline->end))
+2
View File
@@ -615,6 +615,8 @@ parse_tli_history_buffer(char *history, TimeLineID tli)
if (!result)
result = parray_new();
parray_append(result, entry);
elog(VERBOSE, "parse_tli_history_buffer() found entry: tli = %X, end = %X/%X",
tli, switchpoint_hi, switchpoint_lo);
/* we ignore the remainder of each line */
}