Re: Table partition with primary key in 11.3

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Table partition with primary key in 11.3
Дата
Msg-id 20190607191832.GA23001@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Table partition with primary key in 11.3  (Peter Geoghegan <pg@bowt.ie>)
Ответы Re: Table partition with primary key in 11.3  (Ravi Krishna <ravikrishna@mail.com>)
Re: Table partition with primary key in 11.3  (Peter Geoghegan <pg@bowt.ie>)
Список pgsql-general
On 2019-Jun-07, Peter Geoghegan wrote:

> On Fri, Jun 7, 2019 at 9:10 AM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> > I think vacuuming for global indexes is somewhat challenging as well :-)
> > Maybe not as much as for indirect indexes, that's true.
> >
> > In order for it to be sustainable, I think you'll want to reuse
> > partition identifiers when the partitions are dropped/detached, which
> > means that you need a way to ensure that index entries to those
> > partitions are removed from all indexes.
> 
> I'm not so sure about that. I see your point, but I think that you can
> also make the opposite argument. That is, you can make a good case for
> asynchronously cleaning up the dead entries that point to a dropped
> partition (probably within VACUUM). Perhaps we should offer *both* as
> options.

I was thinking of asynchonously cleaning it up rather than blocking
DROP/DETACH ... which means you need to keep state somewhere.  I don't
think blocking DROP/DETACH is valuable -- a global index that blocks
DROP/DETACH until the index is clean serves no useful purpose.  (You
could think of a multi-step approach with internal transaction commits,
similar to CIC, but you still need a plan to clean that up in case the
server crashes during that operation.)

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Geoghegan
Дата:
Сообщение: Re: Table partition with primary key in 11.3
Следующее
От: "Lu, Dan"
Дата:
Сообщение: RE: Postgres 10.7 Systemd Startup Issue