Re: Remove xmin and cmin from frozen tuples

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Remove xmin and cmin from frozen tuples
Дата
Msg-id 20050901022532.GA23955@surnet.cl
обсуждение исходный текст
Ответ на Remove xmin and cmin from frozen tuples  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Ответы Re: Remove xmin and cmin from frozen tuples  (Josh Berkus <josh@agliodbs.com>)
Re: Remove xmin and cmin from frozen tuples  (ITAGAKI Takahiro <itagaki.takahiro@lab.ntt.co.jp>)
Re: Remove xmin and cmin from frozen tuples  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
On Thu, Sep 01, 2005 at 10:45:44AM +0900, ITAGAKI Takahiro wrote:

Hi,

> I think it would be a waste to retain xmin and cmin for frozen tuples
> because their values represent only 'visible for all transactions'.
> Additionally, most tuples in database can be frozen potentially.

I think this is an interesting idea.  I was thinking that when the tuple
needs to be obsoleted it would need to grow to accomodate the Xmax, but
you are not actually proposing to remove that, so it seems sensible.  In
fact, it is perfectly reasonable to remove Xmin and Cmin, because after
the tuple is frozen, the Xmin never changes again.

Now, one thing of note is that you need to "compress" the page in order
to actually be able to use the just-freed space.  VACUUM could do that,
but maybe it would be better to do it on-line -- the freezing process is
going to have to write the page regardless.  I wonder if with your patch
the page is compressed on the same VACUUM execution that freezes the
tuple?

One thing that comes to mind is that this makes somewhat easier to build
a tool to write pre-built tables, for bulk-loading purposes.  You just
construct the binary file with the HEAP_FROZEN bit set, and then attach
the file to a dummy table.  (Then again, you can do it today, using a
Xmin of FrozenTransactionId.  I wonder why the Bizgres people isn't
advocating a tool to do that.  It is very hard to do with user-defined
types, but for BI/DW you mostly don't need those, do you?)

-- 
Alvaro Herrera -- Valdivia, Chile         Architect, www.EnterpriseDB.com
"Cuando no hay humildad las personas se degradan" (A. Christie)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: TODO item: set proper permissions on non-system schemas
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Call for 7.5 feature completion