Re: memory strangeness (fwd)
От | Curt Sampson |
---|---|
Тема | Re: memory strangeness (fwd) |
Дата | |
Msg-id | Pine.NEB.4.44.0207101319080.21914-100000@angelic.cynic.net обсуждение исходный текст |
Ответ на | Re: memory strangeness (fwd) (Tim Ellis <Tim.Ellis@gamet.com>) |
Список | pgsql-admin |
On Tue, 9 Jul 2002, Tim Ellis wrote: > I've always been a proponent of letting the OS do what it does best, so > this letting-the-OS-buffer-for-you concept, to me, is very appealing. Me too. :-) Especially since it's generally going to be doing some sort of buffering anyway, and has a whole bunch of code designed to optimzize this buffering as best as possible. > You still must know when the OS-buffered data has truly made it to disk > while not needing to submit lots of sync() calls. When you need to force blocks to disk, you just msync() them. The bigger problem, if you're using mmap, is how to make sure your modifications *don't* get written to disk until the WAL blocks have been written. There's no standard way to tell the OS that it may *not* yet write back certain blocks. So instead you'd probably have to reserve the space in a block, keep a separate list of changes to the block that any other processes must also examine, and only apply those changes to the block after the WAL entry is confirmed written to stable storage. cjs -- Curt Sampson <cjs@cynic.net> +81 90 7737 2974 http://www.netbsd.org Don't you know, in this new Dark Age, we're all light. --XTC
В списке pgsql-admin по дате отправления: