Subject backup, restore & db size
Author Claudio Valderrama C.
I'm not going to peek into Guido's problem for now or I will again end up
after 6:20 AM without touching the bed, but I found interesting things:

4K gdb:

SQL> set sqlda_display;
SQL> select S.SAID from SALESAREAS S join DOS_CONSTANTS D on D.NAME=S.SANAME
CON> and D.SHORTCUT=80;

INPUT SQLDA version: 1 sqldaid: ²²²²²²²²²²²²²²
sqldabc: -33686019 sqln: 10 sqld: 0

OUTPUT SQLDA version: 1 sqldaid: ²²²²²²²²²²²²²²¶ sqldabc: -33686019 sqln: 20
sqld: 1
01: sqltype: 500 SHORT sqlscale: 0 sqlsubtype: 0 sqllen: 2
: name: (4)SAID alias: (4)SAID
: table: (10)SALESAREAS owner: (6)SYSDBA


After backup, I tried to restore the original 4KB gdb, no page size change:

gbak: creating indexes
gbak: restoring index RDB$PRIMARY1
gbak: cannot commit index I_SANAME_A_U
gbak: ERROR: internal gds software consistency check (index key too big
(174))

If saname_a_u fails... probably some value went into the field that doesn't
fit into the index.

SQL> drop index i_saname_a_u;
SQL> drop index i_saname_d_u;

SQL> select S.SAID from SALESAREAS S,DOS_CONSTANTS D where D.NAME=S.SANAME
and D.SHORTCUT=80;

=> ok, no problem. However:

SQL> create unique index i_saname_a_u on salesareas(saname);
Statement failed, SQLCODE = -607

unsuccessful metadata update
-STORE RDB$INDICES failed
-internal gds software consistency check (invalid block type encountered
(147))
Statement failed, SQLCODE = -901
invalid transaction handle (expecting explicit transaction start)
SQL>

The index cannot be recreated in the 8KB gdb.

More interesting is that I went to another copy of the 8 KB gdb and issued:
alter index i_saname_a_u inactive;
alter index i_saname_a_u active;

Engine answer: crash with memory error, go to home, good bye.

IB 6.0.0.627 could complete the task.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing