A fresh PostgreSQL install starts without logging connection errors #266
No reviewers
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lantea-one/ninlil!266
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/20-postgres-first-start"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #20
A first start against a PostgreSQL server where the database doesn't exist yet no longer logs two "An error occurred using the connection to database" errors. Instead it logs one Information line: "The database … does not exist yet; creating it and applying N migrations."
RelationalStartupMigratorfirst asksIRelationalDatabaseCreator.ExistsAsync, which EF Core logs at Debug. When the database is missing, the migrator skips the history read, then creates the database and its history table beforeMigrateAsync. Without those two steps,MigrateAsyncprobes them and logs its own errors. TheConnectionErrorevent is not lowered globally.RunAsync_OnAServerWithoutTheDatabase_LogsNoErrorruns on all four engines; the server engines need Docker. It failed on PostgreSQL before the fix.Ninlil.Dns.Data.Integration.Testsproject passes (482 tests), and the build has 0 warnings.developevery time.Not covered here: when a PostgreSQL database already exists but is empty, the first start still logs two errors about the missing history table. A follow-up issue will cover that.
🤖 Generated with Claude Code
https://claude.ai/code/session_01T33E3pmQvqkTriyQUMNUTK
Ghost referenced this pull request2026-11-04 23:27:17 -05:00