Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Date
Msg-id 1153950186.2928.46.camel@localhost.localdomain
Whole thread Raw
In response to Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to user level  (Darcy Buskermolen <darcyb@commandprompt.com>)
List pgsql-hackers
Ühel kenal päeval, K, 2006-07-26 kell 14:27, kirjutas Darcy Buskermolen:
> On Wednesday 26 July 2006 14:03, Tom Lane wrote:
> > Darcy Buskermolen <darcyb@commandprompt.com> writes:
> > >> The question though is if we did that, would Slony actually use it?
> > >
> > > If it made sence to do it, then yes we would do it. The problem ends up
> > > being Slony is designed to work across a multitude of versions of PG, and
> > > unless this was backported to at least 7.4, it would take a while (ie
> > > when we stopped supporting versions older than it was ported into)
> > > before we would make use of it.
> >
> > [ shrug... ]  That's not happening; for one thing the change requires a
> > layout change in pg_control and we have no mechanism to do that without
> > initdb.
>
> I'll take a bit more of a look through the patch and see if it is a real boot
> to use it on those platforms that support it, and that we have a suitable way
> around it on those that don't.

This patch is actually 2 things together:

1) fixing the xid wraparound and related btree brokenness by moving to
8byte txids represented as int8

2) cleaning up and exposing slony's snapshot usage.

Slony stored snapshots in tables as separate xmin, xmax and
list-of-running-transactions and then constructed the snapshot struct
and used it internally.

This patch exposes the snapshot it by providing a single snapshot type
and operators for telling if any int8 trx is committed before or after
this snapshot.

This makes it possible to use txid and snapshots in a a query that does

SELECT records FROM logtable WHERE txid BETWEEN snap1 AND snap2;

that is it gets all records which are committed between two snapshots.

>  But at this point I wouldn't hold my breath on that

Well, switching to using stuff from this patch would fix the
data-corruption-after-2G problem for slony.

That is unless thera are some bugs or thinkos of its own in this
patch :)

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com


pgsql-hackers by date:

Previous
From: "Diogo Biazus"
Date:
Subject: Re: xlogdump behaviour translating dropped relations
Next
From: "Paul S"
Date:
Subject: Re: Better name/syntax for "online" index creation