Change made to make Faster restores with gbak

There is a simple change which makes restores much faster, tested with Linux 2.5 embedded restore
Two databases, with two different tables filled with 2,000,000 records:
create table t1 (n1 integer);
create table t10 (n1 integer, n2 integer, n3 integer, …, n10 integer);

----------------------
Restore timings:
T1: 14.5s
T10: 20.5s

Improved gbak timings:
T1: 9.7s
T10: 14.7s
----------------------

The good news is there is still room to improve the restore speeds , here is Adriano’s tweet:

I do have a slight different method, to insert 100K records in less than 1s over the same localhost method.

Also confirmed by the ending of the article:

PS: There is other restore improvement capable of take down time from
around 8.5s to 0.5s over TCP, but it still requires some analisys.

Creating access control into Lazarus + Firebird applications

This is a getting started article (written in Portuguese) from a series of articles related to Firebird and Lazarus
In the first part it’s explained how to install Lazarus and Firebird/Flamerobin on Ubuntu

I have been implementing the access control on my applications. It is a simple model, I have been “improving” since I started the program and always adapting to the new reality that has been presented. Not the last word on programming, but I believe it can be a good start for those who want to implement something from scratch.

Firebird internals : Asyncronous System Trap

What is Asyncronous System Trap ? : This is similar to Unixes signal’s or OS interrupts.
Technically this is callbacks from Lock Manager into the Engine called when
somebody acquires lock at level not compatible with current level. In this case
all processes who owns the lock receives notification and should take appropriate
action to release lock (immediately or deferred-ASAP).

The main trick with AST’s handlers is that AST is send asynchronously and
handler must take care to work correctly. Since v2.5 all ATS handlers runs in
separate thread. Before v2.5 it works using signals on Unixes and threads on
Windows.

PS the issue with old glibc and FB 2.5 is that since v2.5 we abandoned usage of old
System V semaphores (do you remember “semaphores are exhausted” error ? now
you can forget it completely) and start to use pthread mutexes. And old glibc have a
bugs in pthread mutex implementation.

1 21 22 23 24 25 78