On Sat, Jan 31, 2026 at 11:16:03AM -0600, Sami Imseih wrote: > Also, the anytime flush callback does not need to check if there are > any variable-numbered stats to flush. This will not be needed as > it is in v4-0004 > > ``` > + /* > + * Check if there are any non-transactional stats to flush. Avoid > + * unnecessarily locking the entry if nothing accumulated. > + */ > + if (!(lstats->counts.numscans > 0 || > + lstats->counts.tuples_returned > 0 || > + lstats->counts.tuples_fetched > 0 || > + lstats->counts.blocks_fetched > 0 || > + lstats->counts.blocks_hit > 0)) > + return true; > ```
I think that this kind of check may finish by being expensive. Reducing the number of fields to check for a non-flushing state, if required, would be preferrable. -- Michael
signature.asc
Description: PGP signature
