Re: Checkpoint not retrying failed fsync?

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Re: Checkpoint not retrying failed fsync?
Дата
Msg-id CAEepm=2ubZitOjJYBZq9fLu-zL_04YauC3+j35MqLNK3wR3-aQ@mail.gmail.com
обсуждение исходный текст
Ответ на Checkpoint not retrying failed fsync?  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Ответы Re: Checkpoint not retrying failed fsync?  (Andrew Gierth <andrew@tao11.riddles.org.uk>)
Список pgsql-hackers
On Fri, Apr 6, 2018 at 10:16 AM, Andrew Gierth
<andrew@tao11.riddles.org.uk> wrote:
> Furthermore, checking the trace output from the checkpointer process, it
> is not even attempting an fsync of the failing file; this isn't like the
> Linux fsync issue, I've confirmed that fsync will repeatedly fail on the
> file until the underlying errors stop.

Thank you for confirming that!  Now, how does one go about buying
shares in FreeBSD?

> As far as I can tell from reading the code, if a checkpoint fails the
> checkpointer is supposed to keep all the outstanding fsync requests for
> next time. Am I wrong, or is there some failure in the logic to do this?

Yikes.  I think this is suspicious:

                 * The bitmap manipulations are slightly tricky,
because we can call
                 * AbsorbFsyncRequests() inside the loop and that
could result in
                 * bms_add_member() modifying and even re-palloc'ing
the bitmapsets.
                 * This is okay because we unlink each bitmapset from
the hashtable
                 * entry before scanning it.  That means that any incoming fsync
                 * requests will be processed now if they reach the
table before we
                 * begin to scan their fork.

Why is it OK to unlink the bitmapset?  We still need its contents, in
the case that the fsync fails!

-- 
Thomas Munro
http://www.enterprisedb.com


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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: [HACKERS] path toward faster partition pruning