Re: Bug in recovery of drop database?

David Steele <david@pgbackrest.org>

From: David Steele <david@pgbackrest.org>
To: "pgsql-bugs@lists.postgresql.org" <pgsql-bugs@lists.postgresql.org>
Date: 2025-02-06T15:55:21Z
Lists: pgsql-bugs
On 2/5/25 15:24, David Steele wrote:
> 
> psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: 
> FATAL:  cannot connect to invalid database "mytest"
> HINT:  Use DROP DATABASE to drop invalid databases.

Since this error message started cropping up fairly recently I had a 
look at related commits and found this:

c66a7d75 Handle DROP DATABASE getting interrupted

This commit changed the error message so it is more obvious that 
something has gone wrong, but the underlying issue appears the same for 
recovery.

Before c66a7d75 it looked like this:

FATAL:  database "mytest" does not exist
DETAIL:  The database subdirectory "base/16384" is missing.

Which seems reasonable when just looking at the error and not the detail.

Regards,
-David