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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: [HACKERS] Proposal: Local indexes for partitioned table
Дата
Msg-id CAKJS1f_A-whHVYWQYuf-1XAAo_cGEQSg5BuD3FToAAZ1ETptYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposal: Local indexes for partitioned table  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [HACKERS] Proposal: Local indexes for partitioned table
Список pgsql-hackers
On 8 December 2017 at 11:23, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Dec 7, 2017 at 4:57 PM, David Rowley
> <david.rowley@2ndquadrant.com> wrote:
>> That's true, but is it worth inventing/maintaining an ATTACH syntax
>> for that? It's not a very common case that multiple matching indexes
>> existing. If it is worth it, do we need DETACH at all?
>
> I think it is totally worth it.  A little piece of extra DDL syntax
> isn't that really costing us anything.  Your proposed approach
> probably still has obscure failure cases - e.g. I bet the
> deadlock-avoidance logic in parallel restore won't know about the
> dependency on a seemingly-unrelated object.  Also, the use of a
> seemingly-useless REPLACE syntax in every dump file will probably
> confuse at least a few users, and maybe a few developers, too.  I
> think there is considerable value, both for the system and for the
> humans who use it, in having something that has *exactly* the
> semantics we want rather than *almost* the semantics we want.
>
> I suppose if we want to get cute, we could have ONLY the ATTACH
> syntax; if you attach an index for a partition that already has an
> index attached, that could mean attach to the new one instead of the
> old one (i.e. replace).  But I would just add support for both ATTACH
> and REPLACE and call it good.

ATTACH/REPLACE sounds fine. My objection was more about the
DETACH/ATTACH method to replace an index.

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


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

Предыдущее
От: Jeremy Finzel
Дата:
Сообщение: How to use set/reset role in contrib_regression test?
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: [HACKERS] Parallel Hash take II