Re: [DOCS] Autovacuum and XID wraparound

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [DOCS] Autovacuum and XID wraparound
Дата
Msg-id 20070516020218.GX12731@alvh.no-ip.org
обсуждение исходный текст
Ответ на Re: [DOCS] Autovacuum and XID wraparound  ("Jim C. Nasby" <decibel@decibel.org>)
Ответы Re: [DOCS] Autovacuum and XID wraparound  (Heikki Linnakangas <heikki@enterprisedb.com>)
Список pgsql-patches
Jim C. Nasby wrote:
> On Tue, May 15, 2007 at 06:13:47PM -0400, Alvaro Herrera wrote:
> > Tom Lane wrote:
> > > Alvaro Herrera <alvherre@commandprompt.com> writes:
> > > > I suppose it would be pretty trivial to set the relfrozenxid to
> > > > RecentXmin or something during TRUNCATE.
> > >
> > > I had the idea we were doing that already --- at least I'm pretty sure I
> > > remember it being discussed.  But I see it's not being done in HEAD.
> >
> > Patch to do it attached.  I am thinking we can do something similar in
> > CLUSTER as well.
>
> Actually, it already happens for CLUSTER because cluster calls
> heap_create_with_catalog, which calls AddNewRelationTuple. See
> backend/catalog/heap.c line 716.

Right, but that heap is dropped later, and only the relfilenode remains,
because they are swapped.

In any case the change is a very small patch, which I attach but I
haven't tested.  This only works if the new rewriteheap stuff actually
changes Xids to follow OldestXmin, i.e. all tuples that have older
Xmin/Xmax are frozen (or marked with the current Xid).  Heikki, can you
confirm that this is the case?

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Вложения

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

Предыдущее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: Maintaining cluster order on insert
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: actualised forgotten Magnus's patch for plpgsql MOVE statement