Unexpected transaction collisions in CREATE TABLE LIKE with explicit target schema

Details

Detail name Value
Changelog Number 4770
Type Bug
Status Resolved
Affected Versions EXASOL 6.0.0, EXASolution 5.0.0
Fix Versions EXASolution 5.0.20, EXASOL 6.0.3
Resolution Date 2017-06-29

CREATE TABLE LIKE statements with an explicit target schema are prone to transaction collisions if the source table is modified in parallel sessions (e.g. ETL processes).

Example

create table TARGET_SCHEMA.TABLE_COPY like SOURCE_SCHEMA.TABLE_SOURCE;

The schema locking of the CREATE TABLE LIKE will be improved to avoid unnecessary conflicts.

Workarounds

  • Using CREATE TABLE AS instead of LIKE avoids the conflicts.
  • Opening the target schema before the CREATE TABLE LIKE prevents the collisions.
  • Using a non-written source table (template usage only).