Search Postgresql Archives

Transaction isolation when applying DDLs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux