From af2f5e83f9b8d1dc0a91495d842c58cf1af75043 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Sat, 28 Jun 2025 07:05:17 +0000 Subject: [PATCH] fix: add --username=postgres to initdb command to ensure postgres role exists The initdb command was creating a superuser with the system username instead of 'postgres', causing connection failures when the code tried to connect as the postgres user. Adding --username=postgres explicitly creates the expected postgres superuser role during database cluster initialization. Fixes #48 Co-authored-by: Samuel --- src/instance/manager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/instance/manager.ts b/src/instance/manager.ts index 660d619..1cc9222 100644 --- a/src/instance/manager.ts +++ b/src/instance/manager.ts @@ -449,6 +449,7 @@ export class InstanceManager { const command = [ initdbPath, '-D', config.spec.storage.dataDirectory, + '--username=postgres', '--auth-local=trust', '--auth-host=md5', `--encoding=${config.spec.database.encoding}`,