Thread: Transaction isolation when applying DDLs

Transaction isolation when applying DDLs

From
"Luigi Antognini"
Date:

Hello,

 

I’m considering to apply DDLs (such as altering columns or constraints) without stopping the application running against the database.

This is quite unusual but could work under certain circumstances, because the application is aware

of any change applied to the underlying database structures.

 

By experimenting with transactional DDL I noticed that the database truly handles them atomically,
even in complex cases, up to hundreds or thousands of DDL statements.

 

My question:  How is transaction isolation defined when applying DDLs?

 

Some experiments showed this behaviour:

  1. external transactions seems to be fully isolated
    from column adds & drops in a DDL transaction
    (structurally speaking, a repeateable read)

  2. external transactions seems to be fully isolated
    from dropping and recreating a column in a DDL transaction
    (structurally speaking, a repeateable read)

  3. external transactions report an error like “could not open relation with OID xxxxxx”
    when the DDL transaction drops and recreates a single table, all tables or an entire schema

This is more than acceptable, as dropping/recreating structures is not
likely to happen in a productive system.

 

What else should I know/consider?

 

Thanks

 

Luigi Antognini