7d5300853b402bb1f50ba1d8ea95f39f7057b989
db-tool): postgres-init: createdb on reuse when target DB missing
Previously when PG_REUSE=1 and PG_VERSION existed but the target database had never been successfully created (e.g. devshell exited mid-init in a prior run), postgres-init skipped createdb and the subsequent psql connection failed with 'database "<db>" does not exist'. Now on reuse path we probe pg_database and create the target DB if missing, making postgres-init fully idempotent across stale-state recovery. Adds postgres-init-reuse-missing-db test.
Description
No description provided
15 MiB
Languages
Go
75.7%
Handlebars
6.7%
TypeScript
4.6%
Shell
2.9%
Nix
2.2%
Other
7.6%