Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Darcy Buskermolen <darcyb(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org, Bruce Momjian <bruce(at)momjian(dot)us>, Marko Kreen <markokr(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Jan Wieck <JanWieck(at)yahoo(dot)com>
Subject: Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to
Date: 2006-07-26 21:43:05
Message-ID: 1153950186.2928.46.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Ü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(at)commandprompt(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Paul S 2006-07-26 21:58:57 Re: Better name/syntax for "online" index creation
Previous Message Diogo Biazus 2006-07-26 21:36:42 Re: xlogdump behaviour translating dropped relations

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2006-07-26 22:26:11 Re: [PATCHES] [PATCH] Provide 8-byte transaction IDs to
Previous Message Alvaro Herrera 2006-07-26 21:35:42 Re: [HACKERS] [PATCH] Provide 8-byte transaction IDs to user level