Subject Re: [firebird-support] Re: Ramdrive
Author Ivan Prenosil
> my assumption, however, would be that if, as stated, firebird doesn't consider shadow files as
> being under two-phase-commit, then it's not going to care if both writes actually happen before
> telling the client that everything's okay, and marking the transaction as committed in the main
> database.

Shadow is de facto physical copy of main database (except extra flag is set in header page of shadow).
The consistence of each database file is ensured by writing pages in specific order,
such that the file is always in consistent state (no astray pointers etc.).
There is no reason why shadow should not follow the same order;
it would be also illogical if shadow could fail in different stage than main database,
which means that processing must be:
write page x to database,
write page x to shadow,
write page y to database,
write page y to shadow, etc.

> will it rollback the main db if it can't write to the shadow? does it postpone writing to
> the shadow until it's got lots of stuff waiting? i don't know.

Just read documentation, AUTO and MANUAL parameters of CREATE SHADOW command.
Basically, if you can't write to shadow, then shadow is considered unavailable,
and further bahaviour depends on Auto/Manual setting.

Ivan Prenosil
http://www.volny.cz/iprenosil/interbase


From: "unordained" <unordained_00@...>
To: <firebird-support@yahoogroups.com>
Sent: 8. 7. 2003 02:22
Subject: Re: [firebird-support] Re: Ramdrive


> maybe because i assume too much?
>
> my assumption, however, would be that if, as stated, firebird doesn't consider shadow files as
> being under two-phase-commit, then it's not going to care if both writes actually happen before
> telling the client that everything's okay, and marking the transaction as committed in the main
> database. will it rollback the main db if it can't write to the shadow? does it postpone writing to
> the shadow until it's got lots of stuff waiting? i don't know.
>
> on the other hand, it would be really sad if firebird couldn't write to the shadow, but still
> committed ... and never fixed the glitch (leading to an out-of-sync shadow file.) it seems fairly
> necessary for it to guarantee that it wrote to the shadow. maybe i assume too much about "not using
> two-phase commit" -- maybe it only means that it uses a different logic?
>
> i'll just wait for people who -do- know to tell me what'll happen.