Crash recovery after dropdb crash

Поиск
Список
Период
Сортировка
От neha khatri
Тема Crash recovery after dropdb crash
Дата
Msg-id CAFO0U+92RVw-ajUGyrDtHGh3Y7tCASampiseNas5Fqfz-pbfpg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Crash recovery after dropdb crash  (neha khatri <nehakhatri5@gmail.com>)
Список pgsql-novice
I was experimenting with the crash recovery of server. So I simulated a crash in dropdb command.

After the crash recovery the server seems to be in inconsistent state. The pg_database still has the dropped database's information. But when I try to connect to that DB following error is seen:
FATAL:  database "testdb" does not exist
DETAIL:  The database subdirectory "base/xxxxx" is missing.

It seems this is know behavior, the code comment in dbcommands.d indicates that:

/*
* Force synchronous commit, thus minimizing the window between removal of
* the database files and commital of the transaction. If we crash before
* committing, we'll have a DB that's gone on disk but still there
* according to pg_database, which is not good.
*/

Is this a bug and needs a fix?


Regards,
Neha

В списке pgsql-novice по дате отправления:

Предыдущее
От: Paul Linehan
Дата:
Сообщение: Re: Finding PostgreSQL sample data.
Следующее
От: neha khatri
Дата:
Сообщение: Re: Crash recovery after dropdb crash