Search Postgresql Archives

Re: "xmin" system column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/26/06, Eric B. Ridge <ebr@xxxxxxxx> wrote:
> Outside of "VACUUM FREEZE", is there any way the "xmin" column in a
> relation can change, assuming of course the tuple is never updated
> again?  I'm considering using this as a way to identify all tuples
> modified in the same transaction (in an effort to group them
> together), and am wondering if there's any way tuples from different
> transactions could end up with the same xmin value.

I had the same problem - how to identify rows by transaction.  I solved
it by using the xxid from Slony-I and making it 8-byte.

http://gborg.postgresql.org/pipermail/slony1-general/2006-January/003668.html
http://gborg.postgresql.org/pipermail/slony1-general/2006-January/003685.html

It has only 2 slight gotchas:

- the function will fail if there are more than 2G tx'es between calls
- you need to bump epoch if you reload dump.

otherwise seems to work fine.

Btw it uses TopTransactionId, so subtransactions should not be problem.

--
marko


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux