@@ -1400,8 +1400,9 @@ ExplainNode(PlanState *planstate, List *ancestors,
14001400show_instrumentation_count ("Rows Removed by Filter" ,1 ,
14011401planstate ,es );
14021402if (es -> analyze )
1403- ExplainPropertyLong ("Heap Fetches" ,
1404- ((IndexOnlyScanState * )planstate )-> ioss_HeapFetches ,es );
1403+ ExplainPropertyInteger ("Heap Fetches" ,
1404+ ((IndexOnlyScanState * )planstate )-> ioss_HeapFetches ,
1405+ es );
14051406break ;
14061407case T_BitmapIndexScan :
14071408show_scan_qual (((BitmapIndexScan * )plan )-> indexqualorig ,
@@ -2325,7 +2326,7 @@ show_sort_info(SortState *sortstate, ExplainState *es)
23252326else
23262327{
23272328ExplainPropertyText ("Sort Method" ,sortMethod ,es );
2328- ExplainPropertyLong ("Sort Space Used" ,spaceUsed ,es );
2329+ ExplainPropertyInteger ("Sort Space Used" ,spaceUsed ,es );
23292330ExplainPropertyText ("Sort Space Type" ,spaceType ,es );
23302331}
23312332}
@@ -2366,7 +2367,7 @@ show_sort_info(SortState *sortstate, ExplainState *es)
23662367ExplainOpenGroup ("Worker" ,NULL , true,es );
23672368ExplainPropertyInteger ("Worker Number" ,n ,es );
23682369ExplainPropertyText ("Sort Method" ,sortMethod ,es );
2369- ExplainPropertyLong ("Sort Space Used" ,spaceUsed ,es );
2370+ ExplainPropertyInteger ("Sort Space Used" ,spaceUsed ,es );
23702371ExplainPropertyText ("Sort Space Type" ,spaceType ,es );
23712372ExplainCloseGroup ("Worker" ,NULL , true,es );
23722373}
@@ -2445,13 +2446,13 @@ show_hash_info(HashState *hashstate, ExplainState *es)
24452446
24462447if (es -> format != EXPLAIN_FORMAT_TEXT )
24472448{
2448- ExplainPropertyLong ("Hash Buckets" ,hinstrument .nbuckets ,es );
2449- ExplainPropertyLong ("Original Hash Buckets" ,
2449+ ExplainPropertyInteger ("Hash Buckets" ,hinstrument .nbuckets ,es );
2450+ ExplainPropertyInteger ("Original Hash Buckets" ,
24502451hinstrument .nbuckets_original ,es );
2451- ExplainPropertyLong ("Hash Batches" ,hinstrument .nbatch ,es );
2452- ExplainPropertyLong ("Original Hash Batches" ,
2452+ ExplainPropertyInteger ("Hash Batches" ,hinstrument .nbatch ,es );
2453+ ExplainPropertyInteger ("Original Hash Batches" ,
24532454hinstrument .nbatch_original ,es );
2454- ExplainPropertyLong ("Peak Memory Usage" ,spacePeakKb ,es );
2455+ ExplainPropertyInteger ("Peak Memory Usage" ,spacePeakKb ,es );
24552456}
24562457else if (hinstrument .nbatch_original != hinstrument .nbatch ||
24572458hinstrument .nbuckets_original != hinstrument .nbuckets )
@@ -2484,8 +2485,10 @@ show_tidbitmap_info(BitmapHeapScanState *planstate, ExplainState *es)
24842485{
24852486if (es -> format != EXPLAIN_FORMAT_TEXT )
24862487{
2487- ExplainPropertyLong ("Exact Heap Blocks" ,planstate -> exact_pages ,es );
2488- ExplainPropertyLong ("Lossy Heap Blocks" ,planstate -> lossy_pages ,es );
2488+ ExplainPropertyInteger ("Exact Heap Blocks" ,
2489+ planstate -> exact_pages ,es );
2490+ ExplainPropertyInteger ("Lossy Heap Blocks" ,
2491+ planstate -> lossy_pages ,es );
24892492}
24902493else
24912494{
@@ -2695,16 +2698,26 @@ show_buffer_usage(ExplainState *es, const BufferUsage *usage)
26952698}
26962699else
26972700{
2698- ExplainPropertyLong ("Shared Hit Blocks" ,usage -> shared_blks_hit ,es );
2699- ExplainPropertyLong ("Shared Read Blocks" ,usage -> shared_blks_read ,es );
2700- ExplainPropertyLong ("Shared Dirtied Blocks" ,usage -> shared_blks_dirtied ,es );
2701- ExplainPropertyLong ("Shared Written Blocks" ,usage -> shared_blks_written ,es );
2702- ExplainPropertyLong ("Local Hit Blocks" ,usage -> local_blks_hit ,es );
2703- ExplainPropertyLong ("Local Read Blocks" ,usage -> local_blks_read ,es );
2704- ExplainPropertyLong ("Local Dirtied Blocks" ,usage -> local_blks_dirtied ,es );
2705- ExplainPropertyLong ("Local Written Blocks" ,usage -> local_blks_written ,es );
2706- ExplainPropertyLong ("Temp Read Blocks" ,usage -> temp_blks_read ,es );
2707- ExplainPropertyLong ("Temp Written Blocks" ,usage -> temp_blks_written ,es );
2701+ ExplainPropertyInteger ("Shared Hit Blocks" ,
2702+ usage -> shared_blks_hit ,es );
2703+ ExplainPropertyInteger ("Shared Read Blocks" ,
2704+ usage -> shared_blks_read ,es );
2705+ ExplainPropertyInteger ("Shared Dirtied Blocks" ,
2706+ usage -> shared_blks_dirtied ,es );
2707+ ExplainPropertyInteger ("Shared Written Blocks" ,
2708+ usage -> shared_blks_written ,es );
2709+ ExplainPropertyInteger ("Local Hit Blocks" ,
2710+ usage -> local_blks_hit ,es );
2711+ ExplainPropertyInteger ("Local Read Blocks" ,
2712+ usage -> local_blks_read ,es );
2713+ ExplainPropertyInteger ("Local Dirtied Blocks" ,
2714+ usage -> local_blks_dirtied ,es );
2715+ ExplainPropertyInteger ("Local Written Blocks" ,
2716+ usage -> local_blks_written ,es );
2717+ ExplainPropertyInteger ("Temp Read Blocks" ,
2718+ usage -> temp_blks_read ,es );
2719+ ExplainPropertyInteger ("Temp Written Blocks" ,
2720+ usage -> temp_blks_written ,es );
27082721if (track_io_timing )
27092722{
27102723ExplainPropertyFloat ("I/O Read Time" ,INSTR_TIME_GET_MILLISEC (usage -> blk_read_time ),3 ,es );
@@ -3309,23 +3322,11 @@ ExplainPropertyText(const char *qlabel, const char *value, ExplainState *es)
33093322 * Explain an integer-valued property.
33103323 */
33113324void
3312- ExplainPropertyInteger (const char * qlabel ,int value ,ExplainState * es )
3325+ ExplainPropertyInteger (const char * qlabel ,int64 value ,ExplainState * es )
33133326{
33143327char buf [32 ];
33153328
3316- snprintf (buf ,sizeof (buf ),"%d" ,value );
3317- ExplainProperty (qlabel ,buf , true,es );
3318- }
3319-
3320- /*
3321- * Explain a long-integer-valued property.
3322- */
3323- void
3324- ExplainPropertyLong (const char * qlabel ,long value ,ExplainState * es )
3325- {
3326- char buf [32 ];
3327-
3328- snprintf (buf ,sizeof (buf ),"%ld" ,value );
3329+ snprintf (buf ,sizeof (buf ),INT64_FORMAT ,value );
33293330ExplainProperty (qlabel ,buf , true,es );
33303331}
33313332