Re: ALTER DATABASE SET TABLESPACE vs crash safety

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: ALTER DATABASE SET TABLESPACE vs crash safety
Дата
Msg-id 20081107155949.GC5507@alvh.no-ip.org
обсуждение исходный текст
Ответ на ALTER DATABASE SET TABLESPACE vs crash safety  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: ALTER DATABASE SET TABLESPACE vs crash safety  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> That is, that's true as long as the filesystem copy in fact pushed
> everything to disk.  copydir() does an fsync() on each file it copies,
> so I think we have done as much as we can to protect the data being
> copied, but I wonder if anyone feels it's too dangerous?

Do we need to fsync the directory itself?  My fsync(2) manpage says
      Calling  fsync()  does  not  necessarily ensure that the entry in the directory      containing the file has also
reacheddisk.  For that an explicit fsync()  on  a      file descriptor for the directory is also needed.
 


-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: ALTER DATABASE SET TABLESPACE vs crash safety
Следующее
От: Martin Pihlak
Дата:
Сообщение: Re: auto_explain contrib moudle