Commit ef50b06
committed
fix: Use fresh admin connection after DROP DATABASE
When dropping and recreating a database, the original target_client
was connected to the database being dropped. After DROP DATABASE,
PostgreSQL terminates that connection, causing subsequent CREATE
DATABASE to fail with "connection closed".
Now connects to 'postgres' admin database for CREATE DATABASE,
mirroring the approach already used in drop_database_if_exists().1 parent a353b7f commit ef50b06
1 file changed
Lines changed: 7 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
484 | 489 | | |
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
488 | | - | |
| 493 | + | |
489 | 494 | | |
490 | 495 | | |
491 | 496 | | |
| |||
0 commit comments