Re: Accidental removal of a file causing various problems

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Accidental removal of a file causing various problems
Дата
Msg-id 20180824193302.atba6jchedmzllnh@alvherre.pgsql
обсуждение исходный текст
Ответ на Re: Accidental removal of a file causing various problems  (Pavan Deolasee <pavan.deolasee@gmail.com>)
Ответы Re: Accidental removal of a file causing various problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2018-Aug-25, Pavan Deolasee wrote:

> The errors were simply about about the missing file. See attached
> reproduction script that I created while studying this complaint. It will
> throw errors such as:
> 
> psql: FATAL:  could not open file "base/12669/16387": No such file or
> directory
> CONTEXT:  writing block 207724 of relation base/12669/16387
> 
> Now of course, the file is really missing. But the user was quite surprised
> that they couldn't connect to any database, even though mishap happened to
> a user table in one of their reporting databases.

Hmm, that sounds like there's a bunch of dirty pages waiting to be
written to that nonexistant file, and the error prevents the starting
backend from acquiring a free page on which to read something from disk
for another relation.

> To add to their misery, while restart fixed this error and opened
> their other databases for regular operation, it caused the toast
> corruption.

Sounds like the right data was in shared buffers, but it was lost in the
shutdown.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


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

Предыдущее
От: Pavan Deolasee
Дата:
Сообщение: Re: Accidental removal of a file causing various problems
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Accidental removal of a file causing various problems