Re: Two-phase commit

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Two-phase commit
Дата
Msg-id 20041006233311.GA8221@dcc.uchile.cl
обсуждение исходный текст
Ответ на Re: Two-phase commit  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Two-phase commit  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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>)



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Two-phase commit
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: Two-phase commit