-
Notifications
You must be signed in to change notification settings - Fork 4
Maintenance
nohup rake gwss:reindex_everything RAILS_ENV=production &
This is run as a background job (thanks to nohup
) so you can safely exit your session. In a system with 10,000+ items, it can take several hours.
Manually triggering reindexing will hopefully be no longer necessary when we implement sidekiq
(#31 - this is working in development for our other Hyrax app)
The database includes a searches
table (which seems to come with Blacklight) that, in our experience, grows large over time (e.g. 32 GB / 94M rows over 3.5 years). Its contents do not seem to be needed by the application.
To check the size of the database, at the postgres prompt:
select table_name, pg_table_size(quote_ident(table_name)) from information_schema.tables where table_schema = 'public' order by 2;
To delete the rows:
delete from searches;
To reindex:
reindex table searches;
To vacuum (i.e. return un-needed disk space back to the OS):
vacuum;
Do not run vacuum full
, especially on a production system that is live. vacuum full
requires a lock on the database.