Subject | Re: [firebird-support] Applying DDL sentences while others online. |
---|---|
Author | Aldo Caruso |
Post date | 2011-07-06T13:13:57Z |
Philip,
Thanks for your answer. So, I assume that there is no problem in adding
fields to a table while another transaction is on line.
For other kind of DML ( like deleting fields, setting new referential
integrity constraints, modifying a stored procedure or a trigger, etc. )
I would be more conservative and shut down the database previously.
Regards,
Aldo Caruso
El 05/07/11 18:53, unordained escribió:
Thanks for your answer. So, I assume that there is no problem in adding
fields to a table while another transaction is on line.
For other kind of DML ( like deleting fields, setting new referential
integrity constraints, modifying a stored procedure or a trigger, etc. )
I would be more conservative and shut down the database previously.
Regards,
Aldo Caruso
El 05/07/11 18:53, unordained escribió:
>[Non-text portions of this message have been removed]
> ---------- Original Message -----------
> From: Aldo Caruso <aldo.caruso@...
> <mailto:aldo.caruso%40argencasas.com>>
> > Hello,
> >
> > I've restructured a table ( added a field ) while another
> > connection was still active and selecting from that table.
> > Is there a possibility of data corruption ? Should I have to
> > shutdown the database before applying any DDL sentence ?
> >
> > Thanks,
> > Aldo Caruso
> ------- End of Original Message -------
>
> Having done the same myself, I've not seen any such corruption.
>
> AFAIK, internally, Firebird versions changes to tables, which allows
> it to add/
> drop a field without touching every record of the table. Concurrent
> transactions
> could continue to see (and modify) the table as it was when they started.
>
> See http://tech.groups.yahoo.com/group/firebird-support/message/51699
> for more
> discussion, but no hard documentation. Of note: there's a limit to how
> many times
> you can change a table definition before you need to backup/restore.
>
> Also see
> http://www.ibexpert.info/ibe/index.php?n=Doc.StructureOfADataPage and
> search for "rhd_format", for documentation. Of note: old records get
> updated to
> the newest format when visited, so adding a field may not be
> expensive, but you
> may incur the cost of relocated records (if there's not enough room on
> the
> current page) later?
>
> -Philip
>
>