Shaker (c21vc@mail.delcoelect.com) wrote: : I am trying to understand how dump files work, by reading : Mike Leo's INGRES World '94 paper 'Safe and Recoverable OpenIngres : Database Backup'. I don't know that paper, but I hope, I can help you anyway. : . Between 12.02 and 12.03, an index on table FOO is backed up : . At 12.06, a transaction arrives which deletes row X from table FOO : (and from table FOO's index - assuming a single index). : . At 12.12, table FOO is backed up; the backup will not contain row X; : however, the index (which was backed up before the delete transaction) : will contain row X : Mike says that rollforwarddb will use the dump files to fix this : situation and 'assure row X is in the table FOO, and in the index on FOO, : thus preserving the index integrity.' (Page 6 of the paper.) Shouldn't : the dump file be used to remove row X from the index instead of adding : row X to the table ? Or am I missing something ? The purpose of the dump files is to store any information needed to perform a rollback of all transactions which changed the database while it was backed up. In case of a rollforwarddb this rollback takes place and therefore rebuilds the row X in table FOO. I.e. after applying the dump files, the database is in the consistent state of that point in time, when the backup was started. If your database is journalled (and table FOO as well), rollforwarddb will apply the journal files to re-execute all transactions and thus it will remove row X again. This is the default behavior, you might suppress applying the journal files with a "rollforwarddb -j". : In the same item, Mike uses the term 'before-image of a transaction'. What : does this refer to ? To be more precise, you have 'before-images of the pages that are changed by a transaction'. These before-images are always stored in the log file (to enable the rollback of any open transaction), and while an online- checkpoint is running, they are stored in the dump file, too (to perform a consistent rollforwarddb, as I describe above). : Thanks. : Shaker 'welcome, Christopher -- ____________________________________________________________________________ Christopher Etz Kopernikusstr. 28 D-65929 Frankfurt/Main cetz@cetz.rhein-main.de Tel.: +49 69 318091 Telefax: +49 69 318091 > > > I am trying to understand how dump files work, by reading > Mike Leo's INGRES World '94 paper 'Safe and Recoverable OpenIngres > Database Backup'. In Item 8 of 'How Checkpoints Work', he sets up the > following scenario of an online checkpoint: > > . Between 12.02 and 12.03, an index on table FOO is backed up > > . At 12.06, a transaction arrives which deletes row X from table FOO > (and from table FOO's index - assuming a single index). > > . At 12.12, table FOO is backed up; the backup will not contain row X; > however, the index (which was backed up before the delete transaction) > will contain row X > > Mike says that rollforwarddb will use the dump files to fix this > situation and 'assure row X is in the table FOO, and in the index on FOO, > thus preserving the index integrity.' (Page 6 of the paper.) Shouldn't > the dump file be used to remove row X from the index instead of adding > row X to the table ? Or am I missing something ? > > In the same item, Mike uses the term 'before-image of a transaction'. What > does this refer to ? > > Thanks. > > Shaker > > Shaker, Mike is right. The dump file is used to restore the database to the state it was in at the START of the checkpoint. The deletion of row X is achieved by applying the journals which are the changes since then. The "before-image of a transaction" is the state of the data before the changes occur. On a record-by-record basis, for an update it is the "old record", for an insert it is "no record", for a delete it is "the record". -- Gavin Trigg Internet: gavin@asis.unimelb.EDU.AU Telephone: +61 3 9344 6003 Fax +61 3 9347 4803 Manager Administrative Systems Processing, Information Technology Services, The University of Melbourne, Parkville, Australia. 3052. President, Victorian Ingres Users Association
© William Yuan 2000
Email William