Re: Computing the conflict xid for index page-level-vacuum on primary

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: Computing the conflict xid for index page-level-vacuum on primary
Дата
Msg-id CAPpHfdvAj3Jz7goZu-y-=0WQBbFi1rGjjoTLF3cj1vPpsjURZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Computing the conflict xid for index page-level-vacuum on primary  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Dec 14, 2018 at 9:47 PM Andres Freund <andres@anarazel.de> wrote:
> On 2018-12-14 21:39:48 +0300, Alexander Korotkov wrote:
> > If so, then can we just give up with that?  That is before setting
> > kill_prior_tuple = true, prune corresponding heap tuples.
>
> That'd require WAL logging such changes, which'd be pretty bad, because
> we'd need to do it one-by-one.  What we could do, and what I suggested
> earlier, is that we do a bit more pruning when emitting such WAL
> records.

It's not necessary one-by-one, we could decide to prune the whole heap
page and eventually delete more tuples.  But yes, in worst case it
would be one-by-one.  I'm not sure what would be practical average
value.

Also, for resolving conflicts we only need to inform standby about
latest removed xid.  So, before setting kill_prior_tuple = true, we
might emit WAL record with just latest removed xid, but only if it's
greater than latest removed xid written to the WAL previously.  So, in
worst case it would be one extra WAL record per transaction, but
hopefully it would be much less.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: 'infinity'::Interval should be added
Следующее
От: Erik Rijkers
Дата:
Сообщение: select limit error in file_fdw