Re: Improved estimates for Postgres

From: Tomas Vondra <tomas(at)vondra(dot)me>
To: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, Luís Roberto Weck <luisrweck(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Improved estimates for Postgres
Date: 2026-11-19 16:22:00
Message-ID: 2ce1597c-a2e6-4f06-af89-b4ff38271d23@vondra.me
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 11/19/26 17:11, Laurenz Albe wrote:
> On Thu, 2026-11-19 at 08:57 -0300, Luís Roberto Weck wrote:
>> I've been working on extracting more information from Postgres statistics to better approximate some estimation errors I've faced in the past.
>>
>> I've never submitted a patch before, so before I go and do that, I'd love for some feedback on it from the hackers lurking here.
>>
>> Patch is in https://github.com/lrweck/postgres/pull/1
>>
>> I am also working on other patches that I might share soon.
>
> +2450 lines?
>
> The right approach is to come up with a design first and to discuss it on pgsql-hackers.
>
> Your monster patch seems to implement several features at once. Don't do that.
> Select a single, self-contained feature and do that.
> Pick a simple one for your first patch.
>
> Make sure that you review and understand every single line of code that your chatbot
> generated and can answer questions about it. Dumping generated code on human
> reviewers is impolite; people would resent the waste of their time.
>
> Read the pages with advice for beginning hackers on the PostgreSQL Wiki.
>
> Best hang around on pgsql-hackers for a while and review a couple of patches
> in a commitfest, that will get you in tune with how things work.
>

That's a bit harsh, but I agree the patch needs to be split into smaller
pieces, to make review easier. It also makes it possible to commit one
piece that's ready, and keep working on the rest.

The ticket even splits it into 5 different cases, so why not to split
the patch like that? It's possible an initial commit will introduce some
shared infrastructure, or maybe the patches will have dependencies, but
that's OK.

If you split it like that, I'll take a look ...

regards

--
Tomas Vondra

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luís Roberto Weck 2026-11-19 17:13:05 Re: Improved estimates for Postgres
Previous Message Laurenz Albe 2026-11-19 16:11:15 Re: Improved estimates for Postgres