Skip to content

Re-measure #369 on PostgreSQL 19, which changed how partial-path startup costs are considered #397

Description

@ChronicallyJD

PostgreSQL 19 contains a planner change that targets the exact mispricing #369 is about:

Adjust the optimizer to consider startup costs of partial paths (Robert Haas, Tomas Vondra)

#369 records that the grouped vectorized aggregate's parallel arm loses to the serial node
because the core Finalize is priced off estimate_num_groups on an expression key, which
measured 25x to 42x wrong. Both settings involved are off by default because of it.

This is a measurement, not a feature. Either 19 changes the arm the planner picks on the
shapes in #369, or it does not, and the answer decides whether that issue needs code at
all or only a version gate.

What to run

The #369 shapes on 19, against 18 as the control, with the two settings on:

  • pgcolumnar.enable_group_vectorization
  • pgcolumnar.enable_parallel_vector_agg

Interleave the arms rather than sweeping them, and report the plan actually chosen
alongside the timing. A timing difference with the same plan means something else moved.

Why it is worth doing before any work on #369

If 19 fixes the pricing, the fix for older majors is a different and smaller problem than
the one #369 describes, and the issue's framing changes. If it does not, we have ruled out
the obvious explanation and #369 proceeds with one fewer unknown.

Blocked on nothing. 19 beta 2 builds in the matrix already.

Found while reviewing #390.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions