Skip to content

Commit 40e71d6

Browse files
author
Max Fellows
committed
Seems like pqxx isn't opening transactions correctly for ClickHouse - try manually.
1 parent be3744b commit 40e71d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Source/moja.modules.cbm/src/cbmaggregatorhybridlibpqxxwriter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,14 @@ namespace cbm {
7878
}
7979

8080
work tx(conn);
81+
tx.exec("BEGIN TRANSACTION");
8182
tx.exec((boost::format("INSERT INTO %1%.completed_jobs VALUES (%2%);") % _schema % _jobId).str());
8283
load(tx, (boost::format("%1%.raw_fluxes") % _schema).str(), _fluxDimension);
8384
load(tx, (boost::format("%1%.raw_pools") % _schema).str(), _poolDimension);
8485
load(tx, (boost::format("%1%.raw_errors") % _schema).str(), _errorDimension);
8586
load(tx, (boost::format("%1%.raw_ages") % _schema).str(), _ageDimension);
8687
load(tx, (boost::format("%1%.raw_disturbances") % _schema).str(), _disturbanceDimension);
88+
tx.exec("COMMIT");
8789
tx.commit();
8890
});
8991
}

0 commit comments

Comments
 (0)