[Zope] ZODB question

Tim Peters tim.peters at gmail.com
Wed May 25 11:55:52 EDT 2005


[Pascal Peregrina]
>> In a Zope / Zeo configuration (2.7.6), is there a way, on the Zope
>> instance, to know when the database (Zeo) was last packed ?

[Chris Withers]
> Publicly, maybe not, but there'll definitely be away to find it out
> since the pack machinery checks this.

Sorry, pack times aren't recorded anywhere, period.  In a FileStorage,
each transaction record has a status byte, and that byte is set to a
special "this transaction was packed" value the first time the
transaction is in fact packed.  That's how "the packing machinery"
knows whether it's been asked to pack a transaction that's already
been packed.  The packing machinery has no idea _when_ a transaction
was packed, it knows only whether a given transaction _has_ been
packed.  I suppose you could write a script to rummage through a
Data.fs file, searching for the transaction with the largest tid that
has been packed, or search for the transaction with the smallest tid
that hasn't been packed.  tids normally bear a close relationship to
wall-clock time, but that's not necessarily true either.


More information about the Zope mailing list