hstore_compact.rb hstore_name
This removes all free space (unused file space) from the HStore. Stores the original HStore files in ./hstore_backup by
default.
Examples:
ruby hstore_compact.rb hstore_name description version
cd ../tst
ruby -r locana.rb ../hstore/hstore_compact.rb locana.ls "Locana Objects" "1.00"
cd ../applets
ruby -r notes.rb ../hstore/hstore_compact.rb notes.hs "Locana Notes" "1.00"
ruby -r reminders.rb ../hstore/hstore_compact.rb reminders.hs "Locana Reminders" "1.00"
ruby -r todos.rb ../hstore/hstore_compact.rb todos.hs "Locana Todos" "1.00"
ruby -r timer.rb ../hstore/hstore_compact.rb timer.hs "Locana Timer Data" "1.00"
# the -r is needed so backup_store knows what to do with the internal data stored in each HStore.
To see the contents of the HStores:
cd ../tst
ruby -r locana.rb ../hstore/hstore_dump.rb locana.ls
cd ../applets
ruby -r notes.rb ../hstore/hstore_dump.rb notes.hs
ruby -r reminders.rb ../hstore/hstore_dump.rb reminders.hs
ruby -r todos.rb ../hstore/hstore_dump.rb todos.hs
ruby -r timer.rb ../hstore/hstore_dump.rb timer.hs
This eliminates all free space from the HStore and/or allows you to change the
description and version stored in the descriptor. Call this method (or
tst_hstore_compact.rb) when the HStore
gets too bloated with free space. If this fails, the original files should
remain in the current, unchanged state.
This exports the HStore, creates a new
HStore, imports from the exported
file, and if everything works correctly renames the new HStore to the old name. Descriptor is a
Hash. If you provide a descriptor, it will replace the old descriptor.
Returns export_filename, export_record_count, import_record_count,
error_count