Re: PostgreSQL 9.3 synchronous replication

From: Sergey Arlashin <sergeyarl(dot)maillist(at)gmail(dot)com>
To: Vladimir Borodin <root(at)simply(dot)name>
Cc: pgsql-admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: PostgreSQL 9.3 synchronous replication
Date: 2015-01-21 15:05:20
Message-ID: A34B1C2D-096F-4D98-8DF2-F3FB9F1BEE7B@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On Jan 21, 2015, at 3:19 PM, Vladimir Borodin <root(at)simply(dot)name> wrote:

>
>> 21 янв. 2015 г., в 11:25, Sergey Arlashin <sergeyarl(dot)maillist(at)gmail(dot)com> написал(а):
>>
>> Hi!
>>
>> Recently I've found out that synchronous replication just guarantees that the commit has reached the transaction log on the slave. Therefore that doesn't mean the slave has replayed the transaction log and a query against the slave will show the transaction's results.
>>
>> So I'm wondering if there is a way to ensure that once a transaction is committed the data is available on the slave and I can get it by executing a query against the slave?
>
> You should set synchronous_commit = on (seems, that right now you have remote_write). See http://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-SYNCHRONOUS-COMMIT for more details.

Actualy I have 'synchronous_commit = on' in my postgresql.conf:

postgres=# show synchronous_commit ;
synchronous_commit
--------------------
on
(1 row)

--
Best regards,
Sergey Arlashin

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Sergey Arlashin 2015-01-21 15:21:43 Re: PostgreSQL 9.3 synchronous replication
Previous Message Matheus de Oliveira 2015-01-21 11:34:06 Re: PostgreSQL 9.3 synchronous replication