Re: extremly low memory usage

From: Tom Lane
Subject: Re: extremly low memory usage
Date: ,
Msg-id: 23044.1124548841@sss.pgh.pa.us
(view: Whole thread, Raw)
In response to: Re: extremly low memory usage  (Michael Stone)
Responses: Re: extremly low memory usage  (Marko Ristola)
List: pgsql-performance

Tree view

extremly low memory usage  (Jeremiah Jahn, )
 Re: extremly low memory usage  (John A Meinel, )
  Re: extremly low memory usage  (Jeremiah Jahn, )
   Re: extremly low memory usage  (John Arbash Meinel, )
 Re: extremly low memory usage  (Jeff Trout, )
  Re: extremly low memory usage  (Jeremiah Jahn, )
   Re: extremly low memory usage  (John Arbash Meinel, )
    Re: extremly low memory usage  (Ron, )
    Re: extremly low memory usage  (Jeremiah Jahn, )
     Re: extremly low memory usage  (John A Meinel, )
      Re: extremly low memory usage  (Ron, )
       Re: extremly low memory usage  (John A Meinel, )
        Re: extremly low memory usage  (Jeremiah Jahn, )
         Re: extremly low memory usage  (Ron, )
          Re: extremly low memory usage  (Jeremiah Jahn, )
        Re: extremly low memory usage  (Jeremiah Jahn, )
         Re: extremly low memory usage  (John A Meinel, )
          Re: extremly low memory usage  (Jeremiah Jahn, )
           Re: extremly low memory usage  (Ron, )
           Re: extremly low memory usage  (John A Meinel, )
         Re: extremly low memory usage  (Dan Harris, )
          Re: extremly low memory usage  (Marko Ristola, )
           Re: extremly low memory usage  (Michael Stone, )
            Re: extremly low memory usage  (Tom Lane, )
             Re: extremly low memory usage  (Marko Ristola, )
          Re: extremly low memory usage  (Michael Stone, )
      Re: extremly low memory usage  (Jeremiah Jahn, )
       Re: extremly low memory usage  (John A Meinel, )
        Re: extremly low memory usage  (Jeremiah Jahn, )
         Re: extremly low memory usage  (Ron, )
          Re: extremly low memory usage  (John A Meinel, )
           Re: extremly low memory usage  (Jeremiah Jahn, )
            Re: extremly low memory usage  (John A Meinel, )
            Re: extremly low memory usage  (Ron, )
             Re: extremly low memory usage  (William Yu, )
             Re: extremly low memory usage  (Jeremiah Jahn, )
              Re: extremly low memory usage  (John A Meinel, )
 Re: extremly low memory usage  (Ron, )
 Re: extremly low memory usage  (Ron, )

Michael Stone <> writes:
> On Sat, Aug 20, 2005 at 02:17:54PM +0300, Marko Ristola wrote:
>> Based on my knoledge, Ext3 is good with keeping filesystem integrity
>> AND data integrity while pressing the reset button.  However, by
>> selecting data=writeback, you gain more speed, but you risk the data
>> integrity during a crash: Ext3 garantees only filesystem integrity.

> That's why postgres keeps its own transaction log. Any of these
> filesystems guarantee data integrity for data that's been synced to
> disk, and postgres keeps track of what data has and has not been
> committed so it can recover gracefully from a failure.

Right.  I think the optimal setting for a Postgres data directory is
journaled metadata, non-journaled file content.  Postgres can take care
of the data integrity for itself, but it does assume that the filesystem
stays structurally sane (eg, data blocks don't get reassigned to the
wrong file), so you need a filesystem guarantee about the metadata.

WAL files are handled in a much more conservative way (created, filled
with zeroes, and fsync'd before we ever put any valuable data in 'em).
If you have WAL on its own drive then I think Mike's recommendation of
no filesystem journalling at all for that drive is probably OK.  Or
you can do same as above (journal metadata only) if you want a little
extra protection.

And of course all this reasoning depends on the assumption that the
drive tells the truth about write-completion.  If the drive does write
caching it had better be able to complete all its accepted writes before
dying in a power failure.  (Hence, battery-backed write cache is OK, any
other kind is evil.)

            regards, tom lane


pgsql-performance by date:

From: Jeremiah Jahn
Date:
Subject: Re: extremly low memory usage
From: Ron
Date:
Subject: Re: extremly low memory usage