Re: Use CLOCK_MONOTONIC_COARSE for instr_time when available

2025-03-26 Thread Jianghua Yang
It Makes sense, but we can distinguish such code which needs ` CLOCK_MONOTONIC`. Now I add the configure option `--with-clock-monotonic-coarse`. Michael Paquier 于2025年3月26日周三 15:34写道: > On Wed, Mar 26, 2025 at 11:14:47AM -0700, 杨江华 wrote: > > This patch modifies the instr_time.h header to pref

Re: Use CLOCK_MONOTONIC_COARSE for instr_time when available

2025-03-27 Thread Jianghua Yang
*I agree, so this patch only affects explain analyze.* *1. This change to CLOCK_MONOTONIC_COARSE only affects EXPLAIN ANALYZE and does not impact other modules.* The patch introduces optional support for CLOCK_MONOTONIC_COARSE specifically within the INSTR_TIMEinstrumentation framework. The modif

[PATCH] Fix potential overflow in binary search mid calculation

2025-03-31 Thread Jianghua Yang
Dear PostgreSQL Developers, I have identified a potential integer overflow issue in the binary search implementation within the DSA size class lookup code. Issue Description In the current implementation, the calculation of mid is performed as: uint16 mid = (max + min) / 2; Since both max and m