[ZODB-Dev] packing ZODB

Hanno Schlichting hanno at hannosch.eu
Thu Mar 31 07:25:35 EDT 2011


Hi.

On Thu, Mar 31, 2011 at 12:46 PM, Adam GROSZER <agroszer at gmail.com> wrote:
> After investigating FileStorage a bit, I found that GC runs on objects,
> but pack later by transactions. That means that if there's a bigger-ish
> transaction, we can't get rid of it until all of it's objects are GCed
> (or superseeded by newer states).
>
> Is that correct?

I think so.

> I think yes, so an idea might be to split up
> transactions to one transaction per object state somehow and pack again.
> This would definitely work only offline of course.

I think it would be interesting to gather some statistics on this. How
often does this actually happen, and how much "orphaned" data could
one get rid of.

Implementing something that iterates over transactions, takes the
"live" objects of it and writes them into a new transaction should be
possible without taking the database offline.

> How is this handled by relstorage?

RelStorage does the same.

Hanno


More information about the ZODB-Dev mailing list