Re: [PATCH] Add sampling statistics to autoanalyze log output

From: Chao Li <li(dot)evan(dot)chao(at)gmail(dot)com>
To: 河田達也 <kawatatatsuya0913(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Add sampling statistics to autoanalyze log output
Date: 2026-01-08 02:53:46
Message-ID: 3FF601D8-3C9E-4163-98CF-9C84368B8120@gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On Dec 7, 2025, at 11:37, 河田達也 <kawatatatsuya0913(at)gmail(dot)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 something we don’t know, we should not pretend that we know. Because from the code comment, we read that that’s assumed, but from 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 need to update the header comment to describe them.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message songjinzhou 2026-01-08 02:57:00 Re: Pasword expiration warning
Previous Message Tom Lane 2026-01-08 02:51:04 Re: Proposal to allow setting cursor options on Portals