Re: nested xacts and phantom Xids

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
Cc: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: nested xacts and phantom Xids
Date: 2004-06-22 02:28:59
Message-ID: 9356.1087871339@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl> writes:
> Regarding the invalidation messages, what I'm currently looking at is to
> add a TransactionId to each message, which will be CurrentTransactionId
> for each new message. When a subxact commits, all its messages are
> relabeled to its parent. When a subxact aborts, all messages labeled
> with its TransactionId are locally processed and discarded.

Sounds plausible offhand.

> This is tricky because chunks are prepended to the queue, but it also
> means we can stop processing as soon as a message belongs to another
> transaction.

AFAIR there isn't any essential semantics to the ordering of the queue
entries, so you can probably get away with reordering if that makes life
any easier.

Also, rather than labeling each entry individually, it might be better
to keep a separate list for each level of transaction. Then instead of
relabeling, you'd just concat the subtrans list to its parent's. Seems
like this should be faster and less storage.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2004-06-22 04:36:37 Re: nested xacts and phantom Xids
Previous Message Tom Lane 2004-06-22 02:18:57 Re: creating a cluster

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2004-06-22 04:36:37 Re: nested xacts and phantom Xids
Previous Message Alvaro Herrera 2004-06-22 02:01:05 Re: nested xacts and phantom Xids