From: Sergey Arlashin <sergeyarl.maillist@gmail.com>
To: Vladimir Borodin <root@simply.name>
Cc: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: PostgreSQL 9.3 synchronous replication
Date: Wed, 21 Jan 2015 19:05:20 +0400
Message-ID: <A34B1C2D-096F-4D98-8DF2-F3FB9F1BEE7B@gmail.com> (raw)
In-Reply-To: <8491EB60-8281-4890-A02D-DC8FF6630D70@simply.name>
References: <B0A4903C-64EA-4DE1-8676-F1177928F6AB@gmail.com>
<8491EB60-8281-4890-A02D-DC8FF6630D70@simply.name>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: sergeyarl.maillist@gmail.com, root@simply.name
Subject: Re: PostgreSQL 9.3 synchronous replication
In-Reply-To: <A34B1C2D-096F-4D98-8DF2-F3FB9F1BEE7B@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox