]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/api/core.py
remove disabling of prepared statements
[nominatim.git] / nominatim / api / core.py
index a9fc12439364415e8a8039f2f45b1eccbea9756e..2a19d97442cc46cf6870b213117cecc7ff65988d 100644 (file)
@@ -57,8 +57,6 @@ class NominatimAPIAsync:
 
             query = {k: v for k, v in dsn.items()
                       if k not in ('user', 'password', 'dbname', 'host', 'port')}
-            if PGCORE_LIB == 'asyncpg':
-                query['prepared_statement_cache_size'] = '0'
 
             dburl = sa.engine.URL.create(
                        f'postgresql+{PGCORE_LIB}',
@@ -66,7 +64,8 @@ class NominatimAPIAsync:
                        username=dsn.get('user'), password=dsn.get('password'),
                        host=dsn.get('host'), port=int(dsn['port']) if 'port' in dsn else None,
                        query=query)
-            engine = sa_asyncio.create_async_engine(dburl, future=True)
+            engine = sa_asyncio.create_async_engine(dburl, future=True,
+                                                    echo=self.config.get_bool('DEBUG_SQL'))
 
             try:
                 async with engine.begin() as conn: