On 2022/02/03 16:45, Ken Kato wrote:
Hi hackers, Unlike xid, xid8 increases monotonically and cannot be reused. This trait makes it possible to support min() and max() aggregate functions for xid8. I thought they would be useful for monitoring. So I made a patch for this.
Thanks for the patch! +1 with this feature. + PG_RETURN_FULLTRANSACTIONID((U64FromFullTransactionId(fxid1) > U64FromFullTransactionId(fxid2)) ? fxid1 : fxid2); Shouldn't we use FullTransactionIdFollows() to compare those two fxid values here, instead? + PG_RETURN_FULLTRANSACTIONID((U64FromFullTransactionId(fxid1) < U64FromFullTransactionId(fxid2)) ? fxid1 : fxid2); Shouldn't we use FullTransactionIdPrecedes() to compare those two fxid values here, instead? Could you add the regression tests for those min() and max() functions for xid8? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION