[gdal-dev] [External] : Re: Can GDAL driver be reused by GDAL python binding

Fengting Chen fengting.chen at oracle.com
Tue Jul 8 14:15:36 PDT 2025


Hi Even,

Thanks for the helpful information. I understand that the connection pool can be stored in the driver instance and destroyed when the driver is destroyed. My question is that in the python environment, when is the individual driver created and registered, and when is the driver deregistered or destroyed?

Thanks!
Fengting

From: Even Rouault <even.rouault at spatialys.com>
Date: Monday, July 7, 2025 at 5:23 PM
To: Fengting Chen <fengting.chen at oracle.com>, gdal dev <gdal-dev at lists.osgeo.org>
Subject: [External] : Re: [gdal-dev] Can GDAL driver be reused by GDAL python binding

Hi,

Connection pooling is an internal implementation driver of each driver. You have to be careful about multi-threaded use cases if you want to implement that though. The PostGISRaster driver has some connection pooling. See PostGISRasterDriver::GetConnection()

Even
Le 07/07/2025 à 21:18, Fengting Chen via gdal-dev a écrit :
Hi,

A Python program can invoke GDAL driver through gdal.open() to read/write raster/vector data. Is it possible for the GDAL driver to be reused in order to avoid reinitializing the driver for each gdal.open() call? For example, if a GDAL driver to a database implements a connection pool, will each gdal.open() call be able to ask the driver to retrieve a db connection from the connection pool, instead of creating a new database connection?

Thanks!



_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/gdal-dev<https://urldefense.com/v3/__https:/lists.osgeo.org/mailman/listinfo/gdal-dev__;!!ACWV5N9M2RV99hQ!KAckGsX9gNCOP-HAQTxfRsZm3Xod4abGQdnGxilkZwyUS8AF_Tt1OaLmGdLSQdFv9inMKSETawTOUt6BTT5Egb0JUSxL$>

--

http://www.spatialys.com<https://urldefense.com/v3/__http:/www.spatialys.com__;!!ACWV5N9M2RV99hQ!KAckGsX9gNCOP-HAQTxfRsZm3Xod4abGQdnGxilkZwyUS8AF_Tt1OaLmGdLSQdFv9inMKSETawTOUt6BTT5EgSzi2TuS$>

My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20250708/fb5f578c/attachment.htm>


More information about the gdal-dev mailing list