File tree Expand file tree Collapse file tree
pg_lake_spatial/tests/pytests Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -203,11 +203,7 @@ def test_gdal_zip_gml(
203203 # Querying is currently not supported because WKB is converted by DuckDB
204204 # Error messages reflect different DuckDB spatial versions
205205 error = run_query ("SELECT shape FROM test_gdal.fdw" , user_conn , raise_error = False )
206- assert (
207- "Geometry type 10 not supported" in error
208- or "'MULTICURVE' is not supported" in error
209- or "Unsupported geometry type in WKB" in error
210- )
206+ assert "Unsupported geometry type in WKB" in error
211207
212208 user_conn .rollback ()
213209
Original file line number Diff line number Diff line change @@ -3394,6 +3394,19 @@ fetch_more_data(ForeignScanState *node)
33943394 fsstate -> eof_reached = true;
33953395 else if (PQresultStatus (res ) != PGRES_SINGLE_TUPLE )
33963396 {
3397+ /*
3398+ * Drain remaining results so the connection processes
3399+ * ReadyForQuery and reaches idle state before the error
3400+ * unwinds the stack. Without this, transaction abort cleanup
3401+ * sees a busy connection and reports a spurious "lost
3402+ * connection to query engine" error.
3403+ */
3404+ PGresult * remaining = WaitForLastResult (fsstate -> conn );
3405+
3406+ if (remaining != NULL )
3407+ PQclear (remaining );
3408+ fsstate -> eof_reached = true;
3409+
33973410 ThrowIfPGDuckResultHasError (fsstate -> conn , res );
33983411 }
33993412 }
You can’t perform that action at this time.
0 commit comments