pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Benjamin Arai <barai@cs.ucr.edu>
Cc: pgsql-performance@postgresql.org
Subject: Re: Ensuring data integrity with fsync=off
Date: Sat, 14 Jan 2006 13:41:43 -0500
Message-ID: <20897.1137264103@sss.pgh.pa.us> (raw)
In-Reply-To: <000601c61936$38548770$fa48fd0a@uni>
References: <000601c61936$38548770$fa48fd0a@uni>

"Benjamin Arai" <barai@cs.ucr.edu> writes:
> Right now I run "sync" afte the updates have finished to ensure that the
> data is synced to disk but I am concerned about the segment data and
> anything else I am missing that PostgreSQL explicitly handles.  Is there
> something I can do in addition to sync to tell PostgreSQL exlplicitly that
> it is time to ensure everything is stored in its final destionation and etc?

You need to give PG a CHECKPOINT command to flush stuff out of its
internal buffers.  After that finishes, a manual "sync" commnd will
push everything down to disk.

You realize, of course, that a system failure while the updates are
running might leave your database corrupt?  As long as you are prepared
to restore from scratch, this might be a good tradeoff ... but don't
let yourself get caught without an up-to-date backup ...

			regards, tom lane



view thread (3+ messages)  latest in thread

Message-ID: <20897.1137264103@sss.pgh.pa.us>
Permalink:  ../20897.1137264103@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/20897.1137264103@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, barai@cs.ucr.edu
  Subject: Re: Ensuring data integrity with fsync=off
  In-Reply-To: <20897.1137264103@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox