Re: [PATCH] Add support for SAOP in the optimizer for partial index paths

From: Jim Vanns <james(dot)vanns(at)gmail(dot)com>
To: Nishant Sharma <nishant(dot)sharma(at)enterprisedb(dot)com>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add support for SAOP in the optimizer for partial index paths
Date: 2026-08-21 15:56:11
Message-ID: CA+PSi_9tcNCsj+jDsn2SiCUsermQLSfpoO+H+rrLNtkzpGiRUg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Apologies for the long pause. I'll try to take on board your comments
when I next find a chance to contribute and fix up this merge request.
I've now missed the commitfest it was open for, so I'll have to
rebase/repush/reopen anyway.

And sorry for the top-posting (I just read those rules!), by MUA
defaults to it and I've done it for decades so it's a hard habit to
break!

In the meantime, if you were getting a whitespace error when applying
the patches, can I ask how you were doing that? I replayed mine given
the branch point commit ID and didn't see any errors.

Cheers,

Jim

On Mon, 22 Jun 2026 at 12:34, Nishant Sharma
<nishant(dot)sharma(at)enterprisedb(dot)com> wrote:
>
> Thanks Jim for the patches!
>
> The topic is new to me. So, I thought I would review it to learn something.
>
> Here are some quick review comments:
> 0) You are top posting your emails/responses. You can find the details here - https://wiki.postgresql.org/wiki/Mailing_Lists#Email_etiquette_mechanics
>
> 1) Getting white space error when applying PATCH-1, PATCH-4, PATCH-5.
>
> 2) If you would like then both test cases changes can be merged into single patch. That is PATCH-2 & PATCH-3 as one.
>
> 3) Also, the fix (PATCH-4) and improvement(PATCH-5) that you have done can be directly be part of PATCH-1 itself, because they are changing your written function only. I think, no need to create separate patch for them. I think 1 code patch and 1 test patch should suffice.
>
> 4) Your if block of "if (to_remove != NULL)" has become dead code after applying PATCH-4. Where you removed "if (!clauseset.nonempty)" block which was assigning "to_remove". So, I think you should remove all its dead code.
>
> 5) While building "suitable_indexes" & "base_proof_clauses" (there are 2 such more in the patches) you have created a separate code block {} for it. I guess such style is rare in PG coding.
>
> 6) Should we use different name for #define MAX_SAOP_ARRAY_SIZE or make it common for both predtest.c & indxpath.c?
>
>
> Thanks,
> Nishant Sharma,
> EDB, Pune.
> https://www.enterprisedb.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sami Imseih 2026-08-21 15:57:13 Re: pgstat: Flush some statistics within running transactions, take 2
Previous Message Pavel Stehule 2026-08-21 15:47:49 Re: toast table corrupted by vacuum - missing chunk number 0 for toast value