Re: hooks for supporting third party blobs?

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Eric Davies <Eric(at)barrodale(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: hooks for supporting third party blobs?
Date: 2004-12-07 01:30:57
Message-ID: 20041207013057.GB25856@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Dec 06, 2004 at 05:11:21PM -0800, Eric Davies wrote:

> Is anyone aware of any hooks to support schemes such as ours, or has solved
> a similar problem?

There's RegisterXactCallback() and RegisterSubXactCallback() functions
that may be what you want. They are called whenever a transaction or
subtransaction starts, commits, or aborts. You could probably keep a
list of things modified during the transaction, so you can clean up at
transaction end.

(Much like the storage manager does: it only unlinks files for dropped
tables at transaction commit.)

Make sure to react appropiately at subtransaction abort ...

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"Si quieres ser creativo, aprende el arte de perder el tiempo"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2004-12-07 02:34:25 Re: Index scan vs. Seq scan on timestamps
Previous Message Neil Conway 2004-12-07 01:30:18 Re: Performance tuning on RedHat Enterprise Linux 3