Forum OpenACS Improvement Proposals (TIPs): Re: Tip #59: Change default behavior to store files in file system

Just to refresh memories on the pros and cons of storing file storage items in the file system ...

Pro

  • Considerably improved performance, especially with PostgreSQL, with large files, and with AOLserver 4.

Con

  • You need to back up both filesystem and database, and there's a risk of inconsistency between the two.

In the past, the fact that backups might be inconsistent have led us to store files in the database by default. However, those with large installations and large numbers of users seem to universally find the performance issue to be of more importance.

How does the risk of inconsitency really affect the site.

Option 1): There is a file backed up whose revision_id in the database has not been recorded. You loose the file, but have it on disk lingering around and it might be restored.

Option 2): There is a file recorded in the database, but it is no longer there. In this case you can ask the users to upload their files again (wording: "If you uploaded the file within the last @backup_interval@, please revisit our site as it might have been lost").