Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YDtJc-0007jd-PA for pgsql-admin@arkaria.postgresql.org; Wed, 21 Jan 2015 11:19:17 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YDtJc-0007FM-9t for pgsql-admin@arkaria.postgresql.org; Wed, 21 Jan 2015 11:19:16 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YDtJb-0007FB-DT for pgsql-admin@postgresql.org; Wed, 21 Jan 2015 11:19:15 +0000 Received: from forward5l.mail.yandex.net ([84.201.143.138]) by makus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YDtJX-0000Ju-FR for pgsql-admin@postgresql.org; Wed, 21 Jan 2015 11:19:13 +0000 Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [37.140.190.29]) by forward5l.mail.yandex.net (Yandex) with ESMTP id AE258C41300; Wed, 21 Jan 2015 14:19:06 +0300 (MSK) Received: from smtp4o.mail.yandex.net (localhost [127.0.0.1]) by smtp4o.mail.yandex.net (Yandex) with ESMTP id 260F123232F8; Wed, 21 Jan 2015 14:19:06 +0300 (MSK) Received: from 5.45.212.98-red3.dhcp.yndx.net (5.45.212.98-red3.dhcp.yndx.net [5.45.212.98]) by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id x7QqQJlgKl-J5J8aIPe; Wed, 21 Jan 2015 14:19:05 +0300 (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=simply.name; s=mail; t=1421839145; bh=OaGhgdKgHV+D1u3JH2WgCvzNwC5xMWm0sKN/p3Wwy3Y=; h=Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Cc: Message-Id:References:To:X-Mailer; b=bTO8WL4/mB5g2GMC1eG6QsseZcRSgOsg3cdFze6wfk+2YV0OZWy6s+cpD9pWWLEYf 7DgZTVYiVIOlXD6m+h/3LPn9CYDIPNnxdpKEBaXOI68CT9deS2WnA8odDPtDOoXZ+5 MVVjiFLCRYQbb36JhaYSO/smpVuPcEFm2hzs8ko4= Authentication-Results: smtp4o.mail.yandex.net; dkim=pass header.i=@simply.name Content-Type: multipart/alternative; boundary="Apple-Mail=_AA868E49-7E62-40F9-92F1-64548D1ABACA" Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: PostgreSQL 9.3 synchronous replication From: Vladimir Borodin In-Reply-To: Date: Wed, 21 Jan 2015 14:19:05 +0300 Cc: pgsql-admin Message-Id: <8491EB60-8281-4890-A02D-DC8FF6630D70@simply.name> References: To: Sergey Arlashin X-Mailer: Apple Mail (2.1993) X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --Apple-Mail=_AA868E49-7E62-40F9-92F1-64548D1ABACA Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 21 =D1=8F=D0=BD=D0=B2. 2015 =D0=B3., =D0=B2 11:25, Sergey Arlashin = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(= =D0=B0): >=20 > Hi! >=20 > 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. >=20 > 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 =3D 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. >=20 > -- > Best regards, > Sergey Arlashin >=20 > --=20 > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin -- May the force be with you... http://simply.name --Apple-Mail=_AA868E49-7E62-40F9-92F1-64548D1ABACA Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
21 =D1=8F=D0=BD=D0=B2. 2015 =D0=B3., =D0=B2 11:25, Sergey = Arlashin <sergeyarl.maillist@gmail.com> = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0):

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 =3D on (seems, that right now you have = remote_write). See http://www.postgresql.org/docs/current/static/runtime-config-wa= l.html#GUC-SYNCHRONOUS-COMMIT for more details.


--
Best regards,
Sergey = Arlashin

--
Sent via = pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes = to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


--
May the force be with you...




= --Apple-Mail=_AA868E49-7E62-40F9-92F1-64548D1ABACA--