@@ -337,8 +337,8 @@ ptrackCheckpoint(void)
337337XLogRecPtr init_lsn ;
338338pg_atomic_uint64 buf [PTRACK_BUF_SIZE ];
339339struct stat stat_buf ;
340- int i = 0 ;
341- int j = 0 ;
340+ uint64 i = 0 ;
341+ uint64 j = 0 ;
342342
343343elog (DEBUG1 ,"ptrack checkpoint" );
344344
@@ -430,14 +430,16 @@ ptrackCheckpoint(void)
430430
431431if (j == PTRACK_BUF_SIZE )
432432{
433- int writesz = sizeof (buf );
433+ int writesz = sizeof (buf );/* Up to ~2 GB for buffer size seems
434+ * to be more than enough, so never
435+ * going to overflow. */
434436
435437/*
436438 * We should not have any allignment issues here, since sizeof()
437439 * takes into account all paddings for us.
438440 */
439441ptrack_write_chunk (ptrack_tmp_fd ,& crc , (char * )buf ,writesz );
440- elog (DEBUG5 ,"ptrack checkpoint: i%d , j%d , writesz %d PtrackContentNblocks " UINT64_FORMAT ,
442+ elog (DEBUG5 ,"ptrack checkpoint: i" UINT64_FORMAT " , j" UINT64_FORMAT " , writesz %d PtrackContentNblocks "UINT64_FORMAT ,
441443i ,j ,writesz , (uint64 )PtrackContentNblocks );
442444
443445j = 0 ;
@@ -450,7 +452,7 @@ ptrackCheckpoint(void)
450452int writesz = sizeof (pg_atomic_uint64 )* j ;
451453
452454ptrack_write_chunk (ptrack_tmp_fd ,& crc , (char * )buf ,writesz );
453- elog (DEBUG5 ,"ptrack checkpoint: final i%d , j%d , writesz %d PtrackContentNblocks " UINT64_FORMAT ,
455+ elog (DEBUG5 ,"ptrack checkpoint: final i" UINT64_FORMAT " , j" UINT64_FORMAT " , writesz %d PtrackContentNblocks "UINT64_FORMAT ,
454456i ,j ,writesz , (uint64 )PtrackContentNblocks );
455457}
456458