Re: Partial aggregates pushdown - Mailing list pgsql-hackers

From Zhihong Yu
Subject Re: Partial aggregates pushdown
Date
Msg-id CALNJ-vTQ-kUz0OE7ZBoo-C7sviUv4Sp8HGR0s9wKi8EoW5ZxKQ@mail.gmail.com
Whole thread Raw
In response to Partial aggregates pushdown  (Alexander Pyhalov <a.pyhalov@postgrespro.ru>)
Responses Re: Partial aggregates pushdown
List pgsql-hackers
Hi,
w.r.t. 0001-Partial-aggregates-push-down-v03.patch

For partial_agg_ok(),

+   if (agg->aggdistinct || agg->aggvariadic || agg->aggkind != AGGKIND_NORMAL || agg->aggorder != NIL)
+       ok = false;

Since SearchSysCache1() is not called yet, you can return false directly.

+       if (aggform->aggpartialpushdownsafe != true)

The above can be written as:

       if (!aggform->aggpartialpushdownsafe)

For build_conv_list():

+           Oid         converter_oid = InvalidOid;
+
+           if (IsA(tlentry->expr, Aggref))
...
+           }
+           convlist = lappend_oid(convlist, converter_oid);

Do you intend to append InvalidOid to convlist (when tlentry->expr is not Aggref) ?

Cheers

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Thinking about ANALYZE stats and autovacuum and large non-uniform tables
Next
From: "Bossart, Nathan"
Date:
Subject: Re: should we allow users with a predefined role to access pg_backend_memory_contexts view and pg_log_backend_memory_contexts function?