From: | Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Two-phase commit |
Date: | 2004-10-06 23:33:11 |
Message-ID: | 20041006233311.GA8221@dcc.uchile.cl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Wed, Oct 06, 2004 at 05:46:10PM -0400, Tom Lane wrote:
> You were concerned about how to mark prepared transactions in pg_clog,
> given that Alvaro had already commandeered state '11' for
> subtransactions. Since only a toplevel transaction can be prepared,
> it might work to allow state '11' with a zero pg_subtrans parent link
> to mean a prepared transaction. This would imply factoring prepared
> XIDs into GlobalXmin (so that pg_subtrans entries don't get recycled
> too soon) but we probably have to do that anyway. AFAICS, prepared
> but uncommitted XIDs have to be considered still InProgress, so if
> they are less than GlobalXmin we'd lose.
This seems to work.
I am concerned with a different issue: what issues arise regarding
snapshots? Do concurrent xacts see a prepared one as running? I'm not
sure but I think so. So they have to be able to at least get its Xid,
no?
As soon as you have that stored somewhere, you have to ensure that an
arbitrary number of Xids, or better, snapshots, have to be somewhere.
The "100" concept does not impress me either. So if you can have an
arbitrary number of snapshots, you can as well have an arbitrary number
of WITH HOLD open cursors, without the ugly Materialize node.
Am I right?
--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-10-06 23:38:39 | Re: Two-phase commit |
Previous Message | Tom Lane | 2004-10-06 23:07:37 | Re: Two-phase commit |
From | Date | Subject | |
---|---|---|---|
Next Message | Oliver Jowett | 2004-10-06 23:38:39 | Re: Two-phase commit |
Previous Message | Tom Lane | 2004-10-06 23:07:37 | Re: Two-phase commit |