Subject | One interesting idea (fixme if I'm wrong) |
---|---|
Author | Bogusław Brandys |
Post date | 2002-09-04T14:08:50Z |
Hello,
I've just read technical paper from Borland's Intebase Web about Transaction
Inventory Pages(TIP) , Oldest interesting Transaction (OIT) and Oldest
Active Transaction (OAT) .
Not all are clear for me, but I have an interesting idea.(at the user point
of view)
Firebird is known from good shadowing and backup but do not have any log
file to rollback to some time point in the past .
This is not quite exact , i think :-)
I don't remember how this log is called in another database systems,but is
sometimes used becouse someone deleted critical information from database
(very bad database ;-) .
Let me explain.
Firebird database manager does good housekeeping with old versions of
records,and here my idea occurs.
Assume we have ordinary database which is not swept during day but at night,
and backup is done once a week.
Define some server feature like "VANISH_TIMESTAMP":
VANISH_TIMESTAMP 12 (default = 12 hours)
Now all records should have not only transaction id but also a timestamp
when were created
(sufficient is to store one double value for record).Alternatively all
transactions in TIP could use timestamp, I don't know which is better (?)
When "VANISH_TIMESTAMP" is declared database manager should not delete
committed records which are "younger " than 12 hours from now ,even if are
many such records.
Gbak would have a feature to rollback database to some point in the past 12
hours.
Making all records with timestamp also give us an option to easy replicate
database by just periodically check if there is new committed record and
replicate such record in another database (replication could stand internal
Firebird feature)
This is of course an idea (and most of admins won't use it) but allows many
interesting things.
Best Regards
Bogusław Brandys
I've just read technical paper from Borland's Intebase Web about Transaction
Inventory Pages(TIP) , Oldest interesting Transaction (OIT) and Oldest
Active Transaction (OAT) .
Not all are clear for me, but I have an interesting idea.(at the user point
of view)
Firebird is known from good shadowing and backup but do not have any log
file to rollback to some time point in the past .
This is not quite exact , i think :-)
I don't remember how this log is called in another database systems,but is
sometimes used becouse someone deleted critical information from database
(very bad database ;-) .
Let me explain.
Firebird database manager does good housekeeping with old versions of
records,and here my idea occurs.
Assume we have ordinary database which is not swept during day but at night,
and backup is done once a week.
Define some server feature like "VANISH_TIMESTAMP":
VANISH_TIMESTAMP 12 (default = 12 hours)
Now all records should have not only transaction id but also a timestamp
when were created
(sufficient is to store one double value for record).Alternatively all
transactions in TIP could use timestamp, I don't know which is better (?)
When "VANISH_TIMESTAMP" is declared database manager should not delete
committed records which are "younger " than 12 hours from now ,even if are
many such records.
Gbak would have a feature to rollback database to some point in the past 12
hours.
Making all records with timestamp also give us an option to easy replicate
database by just periodically check if there is new committed record and
replicate such record in another database (replication could stand internal
Firebird feature)
This is of course an idea (and most of admins won't use it) but allows many
interesting things.
Best Regards
Bogusław Brandys