pgsql: Ignore nullingrels when looking up statistics

2025-01-02 Thread Richard Guo
Ignore nullingrels when looking up statistics When looking up statistical data about an expression, we do not need to concern ourselves with the outer joins that could null the Vars/PHVs contained in the expression. Accounting for nullingrels in the expression could cause estimate_num_groups to c

pgsql: Ignore nullingrels when looking up statistics

2025-01-02 Thread Richard Guo
Ignore nullingrels when looking up statistics When looking up statistical data about an expression, we do not need to concern ourselves with the outer joins that could null the Vars/PHVs contained in the expression. Accounting for nullingrels in the expression could cause estimate_num_groups to c

pgsql: Ignore nullingrels when looking up statistics

2025-01-02 Thread Richard Guo
Ignore nullingrels when looking up statistics When looking up statistical data about an expression, we do not need to concern ourselves with the outer joins that could null the Vars/PHVs contained in the expression. Accounting for nullingrels in the expression could cause estimate_num_groups to c

pgsql: Fix outdated CHUNKHDRSZ value in nodeAgg.c

2025-01-02 Thread David Rowley
Fix outdated CHUNKHDRSZ value in nodeAgg.c CHUNKHDRSZ was defined as 16 bytes, which was true when that code went in, but since c6e0fe1f2, 8 is a more accurate value. Here we adjust it to use sizeof(MemoryChunk), which is normally 8, or 16 for cassert builds. c6e0fe1f2 first appeared in v16, so