Re: [HACKERS] Potential data loss of 2PC files

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [HACKERS] Potential data loss of 2PC files
Дата
Msg-id CAB7nPqQx2rQ+h_NHzHr444RBSjVXSo1n-cqf9+gZFiQOBatgMw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Potential data loss of 2PC files  (Andres Freund <andres@anarazel.de>)
Ответы Re: [HACKERS] Potential data loss of 2PC files  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Dec 23, 2016 at 3:02 AM, Andres Freund <andres@anarazel.de> wrote:
> Not quite IIRC: that doesn't deal with file size increase.  All this would be easier if hardlinks wouldn't exist
IIUC.It's basically a question whether dentry, inode or contents need to be synced.   Yes, it sucks.
 

I did more monitoring of the code... Looking at unlogged tables and
empty() routines of access methods, isn't there a risk as well for
unlogged tables? mdimmedsync() does not fsync() the parent directory
either! It seems to me that we want to fsync() the parent folder in
this code path especially and not just at checkpoint as this assumes
that it does not care about shared buffers. We could do that at
checkpoint as well, actually, by looping through all the tablespaces
and fsync the database directories.

Robert, as the former author of unlogged tables and Andres, as you
have done a lot of work on durability, could you share your opinion on
the matter? Of course opinions of others are welcome!
-- 
Michael



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] Speedup twophase transactions
Следующее
От: Ashutosh Bapat
Дата:
Сообщение: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables