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

From Josh Berkus
Subject Re: Remove xmin and cmin from frozen tuples
Date
Msg-id 200509010920.48695.josh@agliodbs.com
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
List pgsql-hackers
Alvaro,

> What issues did he raise on this?

On having no Xmin.

> 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.

So, bulk loading by file generation?   So the idea is that you would generate 
a properly formatted PostgreSQL table file, and then in one transaction 
create the table and attach it?

Seems like this would have the additional limitation of being useful only for 
loading new partitions/new tables.  However, it would have some significant 
advantages for bulk loading ... chiefly that the data page generation and 
associated computations could be done *off* the database server.   This might 
help considerably in getting around the 100mb/s data computation ceiling 
we're hitting ...

-- 
Josh Berkus
Aglio Database Solutions
San Francisco


pgsql-hackers by date:

Previous
From: "Sergey E. Koposov"
Date:
Subject: Re: 8.1beta, Subtle bug in COPY in Solaris systems
Next
From: Tom Lane
Date:
Subject: Re: On hardcoded type aliases and typmod for user types