Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: cf/5361~1
Choose a base ref
...
head repository: postgresql-cfbot/postgresql
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: cf/5361
Choose a head ref
  • 2 commits
  • 5 files changed
  • 2 contributors

Commits on Mar 9, 2025

  1. Teach Append to consider tuple_fraction when accumulating subpaths.

    This change is dedicated to more active usage of IndexScan and parameterized
    NestLoop paths in partitioned cases under an Append node, as it already works
    with plain tables.  As newly added regression tests demonstrate, it should
    provide more smartness to the partitionwise technique.
    
    With an indication of how many tuples are needed, it may be more meaningful
    to use the 'fractional branch' subpaths of the Append path list, which are
    more optimal for this specific number of tuples.  Planning on a higher level,
    if the optimizer needs all the tuples, it will choose non-fractional paths.
    In the case when, during execution, Append needs to return fewer tuples than
    declared by tuple_fraction, it would not be harmful to use the 'intermediate'
    variant of paths.  However, it will earn a considerable profit if a sensible
    set of tuples is selected.
    
    The change of the existing regression test demonstrates the positive outcome
    of this feature: instead of scanning the whole table, the optimizer prefers
    to use a parameterized scan, being aware of the only single tuple the join
    has to produce to perform the query.
    
    Discussion: https://www.postgresql.org/message-id/flat/CAN-LCVPxnWB39CUBTgOQ9O7Dd8DrA_tpT1EY3LNVnUuvAX1NjA%40mail.gmail.com
    Author: Nikita Malakhov <[email protected]>
    Author: Andrei Lepikhov <[email protected]>
    Reviewed-by: Andy Fan <[email protected]>
    Reviewed-by: Alexander Korotkov <[email protected]>
    danolivo authored and Commitfest Bot committed Mar 9, 2025
    Configuration menu
    Copy the full SHA
    f00c43d View commit details
    Browse the repository at this point in the history
  2. [CF 5361] v3 - Let an Append to consider a tuple fraction when choosi…

    …ng fractional subpaths
    
    This branch was automatically generated by a robot using patches from an
    email thread registered at:
    
    https://commitfest.postgresql.org/patch/5361
    
    The branch will be overwritten each time a new patch version is posted to
    the thread, and also periodically to check for bitrot caused by changes
    on the master branch.
    
    Patch(es): https://www.postgresql.org/message-id/CAPpHfdt2oOoarXM71TNL+Ud71DLG506ScpomfNu0LYciedT3ig@mail.gmail.com
    Author(s): Andrei Lepikhov, Nikita Malakhov
    Commitfest Bot committed Mar 9, 2025
    Configuration menu
    Copy the full SHA
    82d793d View commit details
    Browse the repository at this point in the history
Loading