Re: [HACKERS] Problem with the numbers I reported yesterday

From: ocie(at)paracel(dot)com
To: maillist(at)candle(dot)pha(dot)pa(dot)us (Bruce Momjian)
Cc: boersenspiel(at)vocalweb(dot)de, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Problem with the numbers I reported yesterday
Date: 1998-02-12 18:22:47
Message-ID: 9802121822.AA27185@dolomite.paracel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>
> >
> > Hi,
> >
> > perhaps a stupid question:
> >
> > What will happen, if you start PostgreSQL with -F and write a script
> > which is a loop that fsyncs every 2 seconds? Does this lead to a
> > database which is "almost" correct? Does this seem like a good
> > compromise?
>
> Well, you really have to sync the data pages BEFORE sync'ing pg_log.

Why should this be necessary? If the transaction is considered
committed once the log has be written, and the system crashes before
the data are written, then postgres can look at the data and logs when
it is next started up and apply all the transactions that were logged
but not committed to the data pages.

Am I missing something? It seems to me if you sync the data pages
first, then what good is the log? (other than being able to retrace
your steps)

Ocie Mitchell

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom I Helbekkmo 1998-02-12 18:27:53 Shared memory corruption?
Previous Message Nguyen, Thuan 1998-02-12 17:25:07