Re: [PATCH] Add sampling statistics to autoanalyze log output - Mailing list pgsql-hackers

From Chao Li
Subject Re: [PATCH] Add sampling statistics to autoanalyze log output
Date
Msg-id 3FF601D8-3C9E-4163-98CF-9C84368B8120@gmail.com
Whole thread Raw
In response to Re: [PATCH] Add sampling statistics to autoanalyze log output  (河田達也 <kawatatatsuya0913@gmail.com>)
Responses Re: [PATCH] Add sampling statistics to autoanalyze log output
List pgsql-hackers

> On Dec 7, 2025, at 11:37, 河田達也 <kawatatatsuya0913@gmail.com> wrote:
>
> Hi,
>
> Here is the updated version (v2).
> This revision fixes the CI failure reported in the previous patch.
> No other functional changes.
>
> Regards,
>
> <v2-0001-Add-sampling-statistics-to-autoanalyze-log-output.patch>

I echo Fujii-san’s test result, I think that is because:

```
+    *scannedpages = relpages;    /* use estimate for foreign tables */
```

You are using estimated value for foreign tables. I also have a concern about assuming 100 rows per page. IMO, if
somethingwe don’t know, we should not pretend that we know. Because from the code comment, we read that that’s assumed,
butfrom an end user’s point of view, they may consider the number is real. 

The other nit comment is, as you add 4 parameters to acquire_sample_rows(), they are all output parameters, I think you
needto update the header comment to describe them. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Proposal to allow setting cursor options on Portals
Next
From: "songjinzhou"
Date:
Subject: Re: Pasword expiration warning