Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When Transactions count exceeded, required backup restore is impossible [CORE4186] #4512

Closed
firebird-automations opened this issue Aug 21, 2013 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Holger Klemt (klemmo)

I created a new database to check what happens when transaction count limit exceeds, after i was working on a customer database where next transaction was around 1bln.

On a fast machine with firebird 2.5.2 sc and 8 parallel running scripts running only a "select current_timestamp from rdb§database" and doing a commit in an endless loop, the server was able to handle aproximatly 11000 transactions per second, which is in my point of view a good value.

Since a typical day has 86400 seconds, it took only 2 and a half day to reach the transaction limit 2^31-?

The almost empty database reached a size of about 600MB, which represents the TIP Pages required for this database.

What happens now is very ugly

C:\firebird\fb25sc\bin>set isc_user=sysdba
C:\firebird\fb25sc\bin>set isc_password=masterkey

C:\firebird\fb25sc\bin>isql d:\db\DB1.FDB
Database: d:\db\DB1.FDB
Statement failed, SQLSTATE = 54000
Implementation limit exceeded
-Transactions count exceeded. Perform backup and restore to make database operab
le again
Statement failed, SQLSTATE = 54000
Implementation limit exceeded
-Transactions count exceeded. Perform backup and restore to make database operab
le again

Ok, let´s try it

C:\firebird\fb25sc\bin>gbak d:\db\DB1.FDB D:\db\db1.fbk -v
gbak:readied database d:\db\DB1.FDB for backup
gbak:creating file D:\db\db1.fbk
gbak:starting transaction
gbak: ERROR:invalid transaction handle (expecting explicit transaction start)
gbak:Exiting before completion due to errors

:-( Very bad, i tried several gbak params, none resulted in a usable database

It sems that the database is lost for future use. This is defintly a good reason to make the transaction counter a 64 bit version in the future, but also perhaps perform an automatic shutdown of the database when 99,9% of the available transactions are reached for new releases of old versions

If anyone wants to test it with my database, it is availble here for download htt.<//www.ibexpert.com/firebird/db1.7z> (packed only 220kb)

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

You need to make the database read-only using gfix and then proceed with gbak.

@firebird-automations
Copy link
Collaborator Author

Commented by: Holger Klemt (klemmo)

yes, this is the solution, sorry, so the issue can be closed

@firebird-automations
Copy link
Collaborator Author

Commented by: Holger Klemt (klemmo)

perhaps the error message should be

-Transactions count exceeded. Use gfix to make database readonly and perform backup and restore to make database operable again

@firebird-automations
Copy link
Collaborator Author

Commented by: Nick Upson (nickupson)

is there some reason the transaction counter cannot be reset when any time there are no transactions, possibly triggered by the last one completing or the first one starting

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

It cannot be reset because records in the database are expected to have their stored transaction numbers less than the next transaction counter.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant