mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-21 16:36:34 +03:00
Ensure pg data dir exists
This commit is contained in:
parent
26f0f13b39
commit
0eccfbec47
|
@ -99,6 +99,7 @@ def configure_postgres():
|
|||
Set up PostgreSQL config before the service starts.
|
||||
"""
|
||||
logger.info("Configuring Postgres")
|
||||
opt.pg_data_dir.mkdir(parents=True, exist_ok=True)
|
||||
with (opt.pg_data_dir / 'postgresql.conf').open('a') as f:
|
||||
# allow > 1 prepared transactions for test cases
|
||||
print("max_prepared_transactions = 10", file=f)
|
||||
|
|
Loading…
Reference in New Issue
Block a user