[elephant-devel] Postmodern backend; are values ever removed from the blob table

Henrik Hjelte henrik at evahjelte.com
Fri Dec 12 10:28:20 UTC 2008


On Thu, Dec 11, 2008 at 6:09 PM, Robert Synnott <rsynnott at gmail.com> wrote:

> I have two other minor worries about this technique. First, it would
> seem possible that if, say, we have slot1 in object1 which was set to
> :some-opt at some time in the past, but is now totally unused by any
> object, the blob row containing that would be considered dead; if
> someone comes along while the cleanup is running and sets some slot to
> :some-opt, then it will be in use again, but potentially get deleted
> anyway, because it will have already been deemed dead. This isn't
> really a problem for me; due to the nature of my dataset the chances
> of this happening are remote, but I can imagine it'd be an issue for
> some people

This will not be a problem if the cleanup code is kept in a postgres
transaction. The new slot update to :some-opt (after the delete) will
result in a new entry in the blob table (from the stored procedure
sp_ensure_bid).

>
> Secondly, there's the possibility that somebody could put a bid in,
> say, a serialized list. This would NOT be detected by the procedure
> I've outlined, and the thing with that bid would be deleted if not
> referred to elsewhere. Again, this isn't a problem for me, but
> somebody else might potentially be doing it.

It would be a fair punishment. The blob table and bids should be
considered internal to db_postmodern, you are not supposed to mess
with it or use these values in your application code.

>
> Beyond those, though, in the normal case I am correct to assume that a
> blob entry can be considered totally unused if not referred to in
> either slots or any tree?

Yes.

/Henrik Hjelte




More information about the elephant-devel mailing list