Re: [HACKERS] Declarative partitioning - another take

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [HACKERS] Declarative partitioning - another take
Дата
Msg-id CA+TgmoagrS6sqNbuTXZfaLvygH1oiT2KAvs3PUKj+WaXxqCmmQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Declarative partitioning - another take  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] Declarative partitioning - another take  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-hackers
On Tue, Dec 27, 2016 at 3:59 AM, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Patches 0001 to 0006 unchanged.

Committed 0001 earlier, as mentioned in a separate email.  Committed
0002 and part of 0003.  But I'm skeptical that the as-patched-by-0003
logic in generate_partition_qual() makes sense.  You do this:
       result = list_concat(generate_partition_qual(parent),
copyObject(rel->rd_partcheck));
       /* Mark Vars with correct attnos */       result = map_partition_varattnos(result, rel, parent);

But that has the effect of applying map_partition_varattnos to
everything in rel->rd_partcheck in addition to applying it to
everything returned by generate_partition_qual() on the parent, which
doesn't seem right.

Also, don't we want to do map_partition_varattnos() just ONCE, rather
than on every call to this function?  I think maybe your concern is
that the parent might be changed without a relcache flush on the
child, but I don't quite see how that could happen.  If the parent's
tuple descriptor changes, surely the child's tuple descriptor would
have to be altered at the same time...

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] ALTER SYSTEM for pg_hba.conf
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: [HACKERS] merging some features from plpgsql2 project