Subject Re: [firebird-support] Re: Grant priviliges - another question.
Author Ann W. Harrison
Adam wrote:

>
> While Firebird has MVCC on table records, it does not have any such
> concept on table meta data. If you have are in the middle of a
> transaction and all of a sudden the table has more or fewer fields,
> or there is a new constraint or something, then it is really going to
> confuse things. Firebird will NOT let you change the meta data of a
> table that is "in use", in fact you will get such a message if you
> try.
>

The RDB$FORMATS table holds the key to multiple versions of tables - at
least as far as adding, dropping, and altering fields is concerned.
Each record is stored with a format version number and the format
definitions are preserved until the database is backed up and restored
with gbak. So, if you have a table with four fields and add a fifth,
nothing changes in the database, except that a new format version is
created for the table. New records will be stored with five fields, old
requests will continue to receive records in the old, four field format.

Constraints and indexes are a somewhat different issue because existing
requests can't just ignore them. To create or drop an index, you have
to wait until running requests stop. To create or drop a referential
constraint in Firebird 1.5 and earlier, you must have exclusive access
to the database. In Firebird 2, you can add referential constraints to
an active database, but still must wait for running requests to finish.

Regards,


Ann