Re: Postgres, fsync, and OSs (specifically linux)

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: Postgres, fsync, and OSs (specifically linux)
Дата
Msg-id CAMsr+YF=FfuNCcBJXV4tDsxQQ=Yu5GfhZ-z6iiu+Y4x2MYzX0Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Postgres, fsync, and OSs (specifically linux)  (Craig Ringer <craig@2ndquadrant.com>)
Ответы Re: Postgres, fsync, and OSs (specifically linux)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hrm, something else that just came up. On 9.6+ we use sync_file_range.
It's surely going to eat errors:

        rc = sync_file_range(fd, offset, nbytes,
                             SYNC_FILE_RANGE_WRITE);

        /* don't error out, this is just a performance optimization */
        if (rc != 0)
        {
            ereport(WARNING,
                    (errcode_for_file_access(),
                     errmsg("could not flush dirty data: %m")));
        }

so that has to panic too.

I'm very suspicious about the safety of the msync() path too.

I'll post an update to my PANIC-everywhere patch that add these cases.


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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: PostgreSQL's handling of fsync() errors is unsafe and risks data loss at least on XFS
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: Local partitioned indexes and pageinspect