Re: Synch Rep for CommitFest 2009-07

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synch Rep for CommitFest 2009-07
Date: 2009-07-15 04:32:33
Message-ID: 3f0b79eb0907142132va77ccc2m87a3ca374f93dd58@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Wed, Jul 15, 2009 at 3:56 AM, Heikki
Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> Here's one little thing in addition to all the stuff already discussed:

Thanks for the comment!

> If that's the only such caller, let's introduce a new function for that
> and keep the XLogFlush() api unchanged.

OK. How about the following function?

------------------
/*
* Ensure that shutdown-related XLOG data through the given position is
* flushed to local disk, and also flushed to the disk in the standby
* if replication is in progress.
*/
void
XLogShutdownFlush(XLogRecPtr record)
{
int save_mode = XLogSyncReplication;

XLogSyncReplication = REPLICATION_MODE_FSYNC;
XLogFlush(record);

XLogSyncReplication = save_mode;
}
------------------

In a shutdown checkpoint case, CreateCheckPoint calls
XLogShutdownFlush, otherwise XLogFlush. And,
XLogFlush uses XLogSyncReplication directly instead of
obsolete 'mode' argument.

If the above is OK, should I update the patch ASAP? or
suspend that update until many other comments arrive?
I'm concerned that frequent small updating interferes with
a review.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2009-07-15 05:02:43 Index AM API changes for deferability
Previous Message higepon 2009-07-15 03:20:47 Re: pg_dump Add dumping of comments on index columns