aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/pageinspect/btreefuncs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
index 8d27c9b0f6f..dd15caa44d4 100644
--- a/contrib/pageinspect/btreefuncs.c
+++ b/contrib/pageinspect/btreefuncs.c
@@ -563,7 +563,12 @@ bt_metap(PG_FUNCTION_ARGS)
*/
if (metad->btm_version >= BTREE_NOVAC_VERSION)
{
- values[j++] = psprintf("%u", metad->btm_oldest_btpo_xact);
+ /*
+ * kludge: btm_oldest_btpo_xact is declared as int4, which is wrong.
+ * We should at least avoid raising an error when its value happens to
+ * exceed PG_INT32_MAX, though.
+ */
+ values[j++] = psprintf("%d", (int) metad->btm_oldest_btpo_xact);
values[j++] = psprintf("%f", metad->btm_last_cleanup_num_heap_tuples);
}
else