Define STATS_MIN_ROWS for minimum rows of stats in ANALYZE

From: Ilia Evdokimov <ilya(dot)evdokimov(at)tantorlabs(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Define STATS_MIN_ROWS for minimum rows of stats in ANALYZE
Date: 2024-12-09 13:10:01
Message-ID: 04cfac17-d7af-4efb-9fad-673c1d2db49d@tantorlabs.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi hackers,

The repeated use of the number 300 in the ANALYZE-related code creates
redundancy and relies on scattered, sometimes unclear, comments to
explain its purpose. This can make the code harder to understand,
especially for new contributors who might not immediately understand its
significance. To address this, I propose introducing a macro
STATS_MIN_ROWS to represent this value and consolidating its explanation
in a single place, making the code more consistent and readable.

--
Best regards,
Ilia Evdokimov,
Tantor Labs LLC.

Attachment Content-Type Size
v1-0001-Define-STATS_MIN_ROWS-for-minimum-rows-of-stats.patch text/x-patch 6.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pritam Baral 2024-12-09 13:20:41 Subscription sometimes loses txns after initial table sync
Previous Message Andrey M. Borodin 2024-12-09 13:02:19 Re: Sort functions with specialized comparators