Skip to content

Commit de7e59e

Browse files
committed
Change ptrack elog lsn style like postgres.
1 parent 967a754 commit de7e59e

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

src/backend/access/heap/ptrack.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -499,10 +499,12 @@ pg_ptrack_test(PG_FUNCTION_ARGS)
499499
if(ptrack_control_lsn < main_page_lsn)
500500
{
501501
necessary_data_counter++;
502-
elog(WARNING, "Block %ud not track. Ptrack lsn:%lx page lsn:%lx",
502+
elog(WARNING, "Block %ud not track. Ptrack lsn:%X/%X page lsn:%X/%X",
503503
nblock,
504-
ptrack_control_lsn,
505-
main_page_lsn);
504+
(uint32) (ptrack_control_lsn >> 32),
505+
(uint32) ptrack_control_lsn,
506+
(uint32) (main_page_lsn >> 32),
507+
(uint32) main_page_lsn);
506508
}
507509
else
508510
continue;
@@ -517,20 +519,24 @@ pg_ptrack_test(PG_FUNCTION_ARGS)
517519
if (ptrack_control_lsn >= main_page_lsn)
518520
{
519521
excess_data_counter++;
520-
elog(WARNING, "Block %ud not needed. Ptrack lsn:%lx page lsn:%lx",
522+
elog(WARNING, "Block %ud not needed. Ptrack lsn:%X/%X page lsn:%X/%X",
521523
nblock,
522-
ptrack_control_lsn,
523-
main_page_lsn);
524+
(uint32) (ptrack_control_lsn >> 32),
525+
(uint32) ptrack_control_lsn,
526+
(uint32) (main_page_lsn >> 32),
527+
(uint32) main_page_lsn);
524528
}
525529
}
526530
/* not tracked data */
527531
else if (ptrack_control_lsn < main_page_lsn)
528532
{
529533
necessary_data_counter++;
530-
elog(WARNING, "Block %ud not tracked. Ptrack lsn:%lx page lsn:%lx",
534+
elog(WARNING, "Block %ud not tracked. Ptrack lsn:%X/%X page lsn:%X/%X",
531535
nblock,
532-
ptrack_control_lsn,
533-
main_page_lsn);
536+
(uint32) (ptrack_control_lsn >> 32),
537+
(uint32) ptrack_control_lsn,
538+
(uint32) (main_page_lsn >> 32),
539+
(uint32) main_page_lsn);
534540
}
535541
LockBuffer(ptrack_buf, BUFFER_LOCK_UNLOCK);
536542
}

0 commit comments

Comments
 (0)