Re: PostgreSQL 9.3 synchronous replication - Mailing list pgsql-admin

From Sergey Arlashin
Subject Re: PostgreSQL 9.3 synchronous replication
Date
Msg-id A34B1C2D-096F-4D98-8DF2-F3FB9F1BEE7B@gmail.com
Whole thread Raw
In response to Re: PostgreSQL 9.3 synchronous replication  (Vladimir Borodin <root@simply.name>)
List pgsql-admin

On Jan 21, 2015, at 3:19 PM, Vladimir Borodin <root@simply.name> wrote:


21 янв. 2015 г., в 11:25, Sergey Arlashin <sergeyarl.maillist@gmail.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

pgsql-admin by date:

Previous
From: Matheus de Oliveira
Date:
Subject: Re: PostgreSQL 9.3 synchronous replication
Next
From: Sergey Arlashin
Date:
Subject: Re: PostgreSQL 9.3 synchronous replication