Re: index files corrupt after file system full
Posted in 1991
Wim writes in Informix-List-Id: <list.418> >We are running out of disk-space now and then. >When someone is updating his database on the moment >the file-system is full, sometimes indexes on tables are >corrupted. >I would like to know if this is a normal behavior. >If not, how can we avoid this (i.e. is there a way to tell >Informix to check for disk-space first before writing)? This is normal for most Unix programs especially anything as complex as B-tree indexes as unix does not provide transaction handling on file systems. By this I mean that to add a new row to a table in C-ISAM (I assume you are using standard engine) may take several writes to the disk. If all of them could be guaranteed or rolled back by unix then you wouldn't get the corruption. Unfortunately Unix doesn't allow for this so the failure can occur on any of the writes leaving a half updated index (Eg. Corrupted). The Online engine does transaction writes so doesn't have this problem. >Using the database, it appears that the transaction-log-file keeps >growing and growing. If that could be avoided, the problem >would be a lot smaller. Why isn't this log-file cleared >after committing changes? The transaction log is used for two purposes. 1. To manage immediate transaction handling. Eg to provide the information for rollbacks. 2. More importantly it keeps a record of all transactions made since the last clear down of the transaction log was done. The idea is that you archive the database on a regular basis. Each time you do this you clear the log. Then in between archives of the database you do regular archives and clears of the log. This means that in the event of a failure you restore the database from the last backup and rerun the archived logs against it to bring it up to date. It is up to you to manage and allows quicker archiving (Eg. A weekend full backup with daily incremental backups for example). It is up to the site to ensure the archives are done and can be read before the logs are cleared or the database restarted. Hope this helps Cheers, Jim -------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 358-5911 Address: 1700 S. Amphlett Blvd. Fax: (415) 571-6429 San Mateo, CA 94402 --------------------------------------------------------------------