Re: Remove xmin and cmin from frozen tuples - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Remove xmin and cmin from frozen tuples
Date
Msg-id 12952.1125587316@sss.pgh.pa.us
Whole thread Raw
In response to Re: Remove xmin and cmin from frozen tuples  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
Responses Re: Remove xmin and cmin from frozen tuples
Re: Remove xmin and cmin from frozen tuples
Re: Remove xmin and cmin from frozen tuples
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> What I'm saying is that you can write a heap file, on which the tuples
> would all have xmin=FrozenTransactionId, xmax=Invalid, and the
> corresponding bits set in the infomask.  This ensures that no matter the
> state of the server, you can plug the file in and all tuples will be
> valid.

> The "only" problem is figuring out how to lay the data in the tuples
> themselves, w.r.t endianness and such.  This is platform-dependent, so
> you have to write code to do it correctly.  In absence of user-defined
> types, this should not be _too_ hard to do.  Of course, such a program
> would in general also be Postgres-version-dependent.

Of course, it's fair to ask whether such a program would be any faster
than binary-mode COPY by the time you got done ... or enough faster to
justify your effort, anyway.

THe only fundamental disadvantage that COPY labors under is having to
write WAL records.  It might be interesting to do something similar to
the recent hacks for CREATE TABLE AS, so that a COPY into a table just
created in the current transaction would skip writing WAL and instead
fsync the table at the end.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew - Supernews
Date:
Subject: Re: TODO item: set proper permissions on non-system schemas
Next
From: Simon Riggs
Date:
Subject: Re: Remove xmin and cmin from frozen tuples