File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,14 @@ SyncMotherDuckCatalogsWithPg_Cpp(bool drop_with_cascade) {
554554
555555 initial_cache_version = pgduckdb::CacheVersion ();
556556
557- auto connection = pgduckdb::DuckDBManager::GetConnection ();
557+ /*
558+ * We don't use GetConnection, because we want to be able to precisely
559+ * control the transaction lifecycle. We commit Postgres connections
560+ * throughout this function, and the GetConnect its cached connection its
561+ * lifecycle would be linked to those postgres transactions, which we
562+ * don't want.
563+ */
564+ auto connection = pgduckdb::DuckDBManager::Get ().CreateConnection ();
558565 auto &context = *connection->context ;
559566
560567 auto &db_manager = duckdb::DatabaseManager::Get (context);
You can’t perform that action at this time.
0 commit comments