Re: Big 7.1 open items

Поиск
Список
Период
Сортировка
От Giles Lean
Тема Re: Big 7.1 open items
Дата
Msg-id 12884.961675088@nemeton.com.au
обсуждение исходный текст
Ответ на RE: Big 7.1 open items  ("Mikheev, Vadim" <vmikheev@SECTORBASE.COM>)
Список pgsql-hackers
> I ment something like this - link(table file, tmp2 file); fsync(tmp2 file);
> unlink(table file); link(tmp file, table file); fsync(table file);
> unlink(tmp file).

I don't see the purpose of the fsync() calls here: link() and unlink()
effect file system metadata, which with normal Unix (but not Linux)
filesystem semantics is written synchronously.

fsync() on a file forces outstanding data to disk; it doesn't effect
the preceding or subsequent link() and unlink() calls unless
McKusick's soft updates are in use.

If the intent is to make sure the files are in particular states
before each of the link() and unlink() calls (i.e. soft updates or
similar functionality are in use) then more than fsync() is required,
since the files can still be updated after the fsync() and before
link() or unlink().

On Linux I understand that a fsync() on a directory will force
metadata updates to that directory to be committed, but that doesn't
seem to be what this code is trying to do either?

Regards,

Giles





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

Предыдущее
От: Giles Lean
Дата:
Сообщение: Re: An idea on faster CHAR field indexing
Следующее
От: darcy@druid.net (D'Arcy J.M. Cain)
Дата:
Сообщение: Re: Changes to functions and triggers