Re: nested xacts and phantom Xids - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: nested xacts and phantom Xids
Date
Msg-id 20040629214758.GA25473@dcc.uchile.cl
Whole thread Raw
In response to Re: nested xacts and phantom Xids  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: nested xacts and phantom Xids
Re: nested xacts and phantom Xids
List pgsql-patches
On Sun, Jun 20, 2004 at 08:49:22PM -0400, Tom Lane wrote:

> There's a good deal more than that missing :-(.  Here are the modules or
> actions that are called in CommitTransaction and/or AbortTransaction
> that have not yet been touched by the patch:
>
> localbuf.c (refcounts need fixed same as bufmgr)

Here is a patch against the original versions of these files; cleaned up
bufmgr.c somewhat.  Adds the same logic to local buffers (moving the
BufferRefCount struct declaration to buf_internals.h so it's shared by
both bufmgr.c and localbuf.c).  Needs xact.c and xact.h patched as in
the second patch.

As with the bufmgr.c original patch, I don't really know how to test
that this actually works.  I fooled around with printing what it was
doing during a subtrans commit/abort, and it seems OK, but that's about
it.  In what situations can a transaction roll back with a nonzero
reference count in a local buffer?

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)

Attachment

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: nested xacts and phantom Xids
Next
From: "Andrew Dunstan"
Date:
Subject: Re: plperl patch