Re: [HACKERS] Proposal: Local indexes for partitioned table

Поиск
Список
Период
Сортировка
Искать
От
Maksim Milyutin
Тема
Re: [HACKERS] Proposal: Local indexes for partitioned table
Дата
Msg-id
ce94a69b-6e6e-5369-8d7b-8ebaad2e4b7a@postgrespro.ru
Ответ на
Список
Дерево обсуждения
[HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Greg Stark <stark@mit.edu>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Simon Riggs <simon@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Jesper Pedersen <jesper.pedersen@redhat.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Simon Riggs <simon@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Michael Paquier <michael.paquier@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <milyutinma@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: [HACKERS] Proposal: Local indexes for partitioned table David Rowley <david.rowley@2ndquadrant.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Robert Haas <robertmhaas@gmail.com>
Re: [HACKERS] Proposal: Local indexes for partitioned table Maksim Milyutin <m.milyutin@postgrespro.ru>
On 19.04.2017 11:42, Ashutosh Bapat wrote:
> On Tue, Apr 18, 2017 at 4:43 PM, Maksim Milyutin
>  wrote:
>>
>> Local partitioned indexes can be recognized through the check on the relkind
>> of table to which the index refers. Something like this:
>>
>> heap = relation_open(IndexGetRelation(indexid, false), heapLockmode);
>> if (heap->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
>>     /* indexid is local index on partitioned table */
>
> An index on partitioned table can be global index (yet to be
> implemented) or a local index. We can not differentiate between those
> just by looking at the relation on which they are built.
>

We could to refine the criteria for the local partitioned index later 
encapsulating it in a macro, e.g., adding a new flag from pg_index that 
differentiate the type of index on partitioned table.


>> Thеsе cases must be caught. But as much as partitioned tables doesn't
>> participate in query plans their indexes are unaccessible by executor.
>> Reindex operation is overloaded with my patch.
>>
>
> A global index would have storage for a partitioned table whereas a
> local index wouldn't have any storage for a partitioned table.
>
> I agree with Amit that we need new relkinds for local as well as global indexes.
>

Ok, thanks for the feedback. Then I'll use a new relkind for local 
partitioned index in further development.



-- 
Maksim Milyutin
Postgres Professional: http://www.postgrespro.com
Russian Postgres Company


В списке pgsql-hackers по дате отправления
От: Petr Jelinek
Дата:
От: Petr Jelinek
Дата:
FAQ