Subject Re: RES: [firebird-support] Copy of the current db not updating generators
Author Mark Rotteveel
On Thu, 31 May 2012 14:29:41 +0200, Hannes Streicher <hstreicher@...>
wrote:
> Hello Tupy... nambá,
>
> what is the setting of forced writes
> because generators are outside of transaction control and thf shud be
> updated
> immediately

If your generators are at the start of the database file and the copying
takes a while (large db), and there are a lot of concurrent transaction
then the state of the generator page at the time that page was copied is
not the same as at the time the last page of the database file is copied.

Eg

T=1 generator page copied, generatorX = 1
T=2 concurrent transaction changes generatorX = 2
.
.
.
T=N last data page is copied, generatorX = 2 + x (where x >= 0)

Now the copy of the database is in an inconsistent state as the generator
page in the copy says the value = 1, while other parts of the file might
have been written as part of the transaction that used the result of the
generator having value 2.