Re: [HACKERS] path toward faster partition pruning

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [HACKERS] path toward faster partition pruning
Дата
Msg-id CAKJS1f9kzQY2W1aMmJ0LbX5bygWYR+usssOu=hRhvKn0TUGqUQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] path toward faster partition pruning  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On 27 February 2018 at 22:33, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Attached an updated version in which I incorporated some of the revisions
> that David Rowley suggested to OR clauses handling (in partprune.c) that
> he posted as a separate patch on the run-time pruning thread [1].

Thanks for fixing that up and including it.

Micro review of v34:

1. Looks like you've renamed the parttypid parameter in the definition
of partkey_datum_from_expr and partition_cmp_args, but not updated the
declaration too.

+static bool partkey_datum_from_expr(Oid parttypid, Expr *expr, Datum *value);

+static bool
+partkey_datum_from_expr(Oid partopcintype, Expr *expr, Datum *value)

+static bool partition_cmp_args(Oid parttypid, Oid partopfamily,
+    PartClause *pc, PartClause *leftarg, PartClause *rightarg,
+    bool *result);

+static bool
+partition_cmp_args(Oid partopcintype, Oid partopfamily,
+    PartClause *pc, PartClause *leftarg, PartClause *rightarg,
+    bool *result)

2. In prune_append_rel_partitions(), it's not exactly illegal, but int
i is declared twice in different scopes. Looks like there's no need
for the inner one.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning
Следующее
От: Anastasia Lubennikova
Дата:
Сообщение: Function to track shmem reinit time