Configuration parameter

min_eager_agg_group_size — PostgreSQL configuration parameter

Category Query Planning Default 8

Sets the minimum average group size required to consider applying eager aggregation.

At a glance

Property Value
Parameter min_eager_agg_group_size
Category Query Planning
Default 8
Value type floating point
Change scope Per-session (SET)
Available in PostgreSQL 19 (added in 19)

What it does

Sets the minimum average group size required to consider applying eager aggregation. This helps avoid the overhead of eager aggregation when it does not offer significant row count reduction. The default is 8.

(Description quoted from the official PostgreSQL documentation.)

How to apply a change

Can be set per session with SET, per role/database with ALTER ROLE/DATABASE ... SET, or globally in postgresql.conf.

Inspect the current value and source with SHOW min_eager_agg_group_size; or SELECT name, setting, unit, context, source FROM pg_settings WHERE name = 'min_eager_agg_group_size';.

Tuning guidance

This parameter is rarely a performance lever. Leave it at the default unless you have a specific, documented reason to change it, change it on one session or one role/database first, and confirm the effect with pg_settings and your own measurements before rolling it out cluster-wide.

Reference

PostgreSQL documentation — min_eager_agg_group_size.

Keep going

Related & next steps

Was this helpful?

← All configuration parameters