Re: Tuning for PostGreSQL Database

From: Alexander Leidinger (Alexander_at_Leidinger.net)
Date: 07/22/03

  • Next message: Dan Langille: "Re: Tuning for PostGreSQL Database"
    Date: Tue, 22 Jul 2003 12:29:27 +0200
    To: freebsd-performance@freebsd.org
    
    

    On Mon, 21 Jul 2003 15:24:00 -0500
    "Jim C. Nasby" <jim@nasby.net> wrote:

    > Of course the *real* issue is ensuring that no matter what, the WAL hits
    > the disk before the main table data does, so that you can do proper
    > recovery (though I'm not as clear on how this works with MVCC). If the
    > issue is only a matter of delayed writes across the board, I don't see
    > that it should really matter... it's just as if the plug got pulled a
    > little earlier.

    SoftUpdates affects metadata updates. Simplified explanation: if you
    don't use SU and delete more than one file in a directory, the changed
    directory information gets written to disk after every deleted file,
    with SU enabled it just writes the directory information after the last
    deleted file (actually SU doesn't know what the last file is, so it uses
    some heuristics, but for this example you can ignore this fact) to disk,
    every change in between will happen in memory only. The same applies to
    the metadata of files (access time, modification time, ...).

    So if you replace a file with SU enabled you may get either the old one
    or the new one, but no inconsistent state in between (this is possible
    without SU).

    Without SU the window of the race condition is smaller, but it's still
    there. I'm not aware of a statistical measurement of the difference, but
    I think the probability of "the plug gets pulled in the wrong moment" is
    the same (Murphy's law applied to this: the probability is "1" ;-) ).

    Bye,
    Alexander.

    -- 
                  The best things in life are free, but the
                    expensive ones are still worth a look.
    http://www.Leidinger.net                       Alexander @ Leidinger.net
      GPG fingerprint = C518 BC70 E67F 143F BE91  3365 79E2 9C60 B006 3FE7
    _______________________________________________
    freebsd-performance@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-performance
    To unsubscribe, send any mail to "freebsd-performance-unsubscribe@freebsd.org"
    

  • Next message: Dan Langille: "Re: Tuning for PostGreSQL Database"

    Relevant Pages

    • Re: How to irrevocably erase data
      ... where the directory information has been cleared and the entire disk ... You can do this using a device called an atomic force microscope (well, ... works as a low-temperature physicist at a magnet lab in Florida. ...
      (comp.sys.mac.apps)
    • Re: Large Drive CBM DOS Mapping Proposals
      ... that the system on the disk drive side of the IEC appends ... the directory location and contents of the directory information to so ... expand how they see fit. ...
      (comp.sys.cbm)
    • Re: FAT32 or NTFS?
      ... >of the directory information about the disk. ... I thought FAT filesystems kept two copies of the directory and the ... file allocation table. ...
      (microsoft.public.windowsxp.general)
    • Re: How to irrevocably erase data
      ... Can anyone easily explain how it is that one can read data off a disk where the directory information has been cleared and the entire disk has been overwritten with zeros? ... I can't imagine why the 3/7/35 approaches even exist. ...
      (comp.sys.mac.apps)
    • Re: How much swap on laptop?
      ... place, and then the disk has to rotate to exactly the right place, ... the "access time" for everything to get in the ... 80 MB/s to 30 MB/s. ... be a very real one data going to or from four high-speed SATA drives in ...
      (Fedora)