Re: HOT patch - version 15

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: HOT patch - version 15
Дата
Msg-id 200709101941.l8AJfVG20152@momjian.us
обсуждение исходный текст
Ответ на Re: HOT patch - version 15  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Ответы Re: HOT patch - version 15  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Re: HOT patch - version 15  ("Pavan Deolasee" <pavan.deolasee@gmail.com>)
Список pgsql-patches
Pavan Deolasee wrote:
> > > Pruning does generate a WAL record at the moment. Maybe you could do
> > > some kind of a quick pruning without a WAL record. Like just modify the
> > > ctid of the oldest dead tuple in the chain, or the redirecting line
> > > pointer if there is one, to point to the latest live tuple, without
> > > removing the dead tuples or the line pointers.
> >
> > I am wondering what you even mean by removing the dead tuples when
> > pruning.  I thought only defragmentation removed tuples.
> >
> >
> Pruning removes intermediate dead tuples by marking their line pointers
> ~LP_USED and redirecting the root line pointer to the first
> live/recently_dead
> tuple in the chain. OTOH defragmentation moves tuples around to repair
> fragmentation. IOW defragmentation is nothing but calling
> PageRepairFragmentation on the page.
>
> For example, if we have a HOT chain of 5 tuples:
>
> 1 --> 2 --> 3 --> 4 --> 5
>
> of which, 1, 2 and 3 are DEAD, 4 is RECENTLY_DEAD and 5 is LIVE
>
> At the end of pruning:
>
> - line pointer of 1 is redirected to 4
> - line pointers of 2 and 3 are marked ~LP_USED
> - the offset of 4 and 5 is unchanged
>
> At the end of defragmentation:
>
> - 4 and 5 are moved to the end of the page to create a larger
> contiguous free space in the page.

Right.  My point is that pruning only modifies item pointers.  It does
not change the actual heap tuples.  In the quote above, how is Heikki's
"quick pruning" different from the pruning you are describing?

--
  Bruce Momjian  <bruce@momjian.us>          http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

Предыдущее
От: "Pavan Deolasee"
Дата:
Сообщение: Re: HOT patch - version 15
Следующее
От: "Heikki Linnakangas"
Дата:
Сообщение: Re: HOT patch - version 15