Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink
Дата
Msg-id 874qsv6zn6.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink  ("Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at>)
Ответы Re: [pgsql-hackers-win32] fsync with sync, and Win32 unlink  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
"Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:

> > Consider either a box with many different postgresql instances, or one
> > that run both postgresql and other software. Issuing sync() in that
> > sitaution will cause sync of a lot of data that probably doesn't need
> > syncing. 
> > But it'd probably be a very good thing on a dedicated server, giving the
> > kernel the chance to optimise.
> 
> It is not like the sync is done every few seconds ! It is currently done
> every 5 minutes (I actually think this is too frequent now that we have 
> bgwriter, 10 - 20 min would be sufficient). So imho even on a heavily 
> otherwise used system the sync will be better.

Well, the further apart it is the more dangerous it is to be calling sync...

I've seen some pretty severe damage caused by calling sync(2) on a loaded
system. The system in question was in the process of copying data to an NFS
mounted archival site. When the sync hit basically everything stopped until
the buffered network writes could be synced. The live database was basically
frozen for a few seconds and the web site nearly crashed. The sysadmin had to
send out a notice asking everybody to refrain from using sync until the
archival process had completed.

Now that's not a common situation, but I think it shows how doing things that
cause system-wide effects is unwise.


-- 
greg



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

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: client side syntax error localisation for psql (v1)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: client side syntax error localisation for psql (v1)