Skip site navigation (1) Skip section navigation (2)

Re: Synchronous replication

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Yeb Havinga <yebhavinga(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Synchronous replication
Date: 2010-07-27 13:17:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Tue, Jul 27, 2010 at 8:48 PM, Yeb Havinga <yebhavinga(at)gmail(dot)com> wrote:
> Is there a reason not to send the signal in XlogFlush itself, so it would be
> called at
> CreateCheckPoint(), EndPrepare(), FlushBuffer(),
> RecordTransactionAbortPrepared(), RecordTransactionCommit(),
> RecordTransactionCommitPrepared(), RelationTruncate(),
> SlruPhysicalWritePage(), write_relmap_file(), WriteTruncateXlogRec(), and
> xact_redo_commit().

Yes, it's because there is no need to send WAL immediately in other
than the following functions:

* EndPrepare()
* RecordTransactionAbortPrepared()
* RecordTransactionCommit()
* RecordTransactionCommitPrepared()

Some functions call XLogFlush() to follow the basic WAL rule. In the
standby, WAL records are always flushed to disk prior to any corresponding
data-file change. So, we don't need to replicate the result of XLogFlush()
immediately for the WAL rule.


Fujii Masao
NTT Open Source Software Center

In response to

pgsql-hackers by date

Next:From: Fujii MasaoDate: 2010-07-27 13:53:45
Subject: Re: Synchronous replication
Previous:From: Joshua TolleyDate: 2010-07-27 13:12:33
Subject: Re: Synchronous replication

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group