Re: BUG #11517: the pg_stat_replication.sync_stat show sync when synchronous_commit is set to be off - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #11517: the pg_stat_replication.sync_stat show sync when synchronous_commit is set to be off
Date
Msg-id CAB7nPqRQ_mp65oR=B9LVr5eeBwjLk8RD3X4trymdG=8ydTHp-A@mail.gmail.com
Whole thread Raw
In response to BUG #11517: the pg_stat_replication.sync_stat show sync when synchronous_commit is set to be off  (amutu@amutu.com)
Responses Re: BUG #11517: the pg_stat_replication.sync_stat show sync when synchronous_commit is set to be off
List pgsql-bugs
On Mon, Sep 29, 2014 at 4:45 PM, <amutu@amutu.com> wrote:

> from the doc,when synchronous_commit set to off or local,the commit will
> not
> wait the remote slave reveive data,so it is not asynchronous
> replication.but I
> find the pg_stat_replication wrongly report the sync_stat to sync.This can

This is not a bug, please refer to the documentation about
synchronous_commit:
http://www.postgresql.org/docs/devel/static/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT

When synchronous_commit is set to off, local or remote_write, the master
node does not wait for the confirmation from the sync standby that the WAL
has been flushed to disk (for remote_write it waits for the write
confirmation), and the standby is still considered as sync, of course if
synchronous_standby_names is set.
Regards,
--
Michael

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #11457: The below query crashes 9.3.5, but not 9.3.4
Next
From: Jov
Date:
Subject: Re: BUG #11517: the pg_stat_replication.sync_stat show sync when synchronous_commit is set to be off