Skip to content

Commit

Permalink
CLOUDSUPPORT-346222: init pool_size=1 for pg (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
thenno authored Oct 26, 2023
1 parent 936359a commit c970e8a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def _convert_date(self, s: str, ignoretz: bool) -> datetime:
async def create_conn_pool(self, db_name_from_query: str) -> asyncpg.Pool:
db_name = self.get_db_name_for_query(db_name_from_query)
conn_line = self.get_conn_line(db_name=db_name)
return await asyncpg.create_pool(conn_line, statement_cache_size=0)
return await asyncpg.create_pool(conn_line, min_size=1, statement_cache_size=0)

@asynccontextmanager
async def _get_connection(self, db_name_from_query: str) -> AsyncIterator[asyncpg.Connection]:
Expand Down

0 comments on commit c970e8a

Please sign in to comment.