Subject Re: RES: [firebird-support] Copy of the current db not updating generators
Author Tupy... nambá
I agree your explanation is highly logical.
But, using the words that were told to me by another developer, the generators values he found are previous values (the last used values at the development db before the overwriting by the new copy) (may be this information is not 100% of confidence, if the generators are in the same file than the tables). I think, at least, they had to be of values changed during the copy process, or old values, if no change have been applied to some of them, ok ?

--- On Thu, 5/31/12, Mark Rotteveel <mark@...> wrote:

From: Mark Rotteveel <mark@...>
Subject: Re: RES: [firebird-support] Copy of the current db not updating generators
Date: Thursday, May 31, 2012, 4:56 PM

On Thu, 31 May 2012 14:29:41 +0200, Hannes Streicher <hstreicher@...>
> 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.


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.



Visit and click the Resources item
on the main (top) menu.  Try Knowledgebase and FAQ links !

Also search the knowledgebases at

Yahoo! Groups Links

[Non-text portions of this message have been removed]