From: | Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com> |
---|---|
To: | Ken Kato <katouknl(at)oss(dot)nttdata(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: [PATCH] Add min() and max() aggregate functions for xid8 |
Date: | 2022-02-04 15:30:26 |
Message-ID: | 69d9da54-7066-dcc2-5efd-5fdad139bc40@oss.nttdata.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-02-04 15:36:19 | Re: [BUG]Update Toast data failure in logical replication |
Previous Message | Julien Rouhaud | 2022-02-04 14:56:58 | Re: Extensible Rmgr for Table AMs |