Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjgqM-0003SD-9l for pgsql-general@arkaria.postgresql.org; Wed, 16 Jan 2019 08:46:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gjgqL-0007y7-0K for pgsql-general@arkaria.postgresql.org; Wed, 16 Jan 2019 08:46:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjgqK-0007y0-OP for pgsql-general@lists.postgresql.org; Wed, 16 Jan 2019 08:46:36 +0000 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gjgqI-0005Xa-NU for pgsql-general@lists.postgresql.org; Wed, 16 Jan 2019 08:46:36 +0000 Received: by mail-ot1-x334.google.com with SMTP id 32so5893013ota.12 for ; Wed, 16 Jan 2019 00:46:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=JtYc4kFlWttpl431W1Z31uNE2/kfUNJjKMseaeSWMGs=; b=h6+xmKDwlyL2xHTUK7p8L8yBmTIWJi9Un/xhCDDMkOeDUdFiIkhm/y/6AQw8Eigliw gqxiDgjh2zj4VX5YSz5DLoPccWvizJaoDUR09LCHVpctUR1SOpAfpJdyeGWgYByRpwrt ZaOk6d9gKNxsaa4sEBDZr6s5Off4urIRcC+ijFUQ2eQiBke6XxrLVjb08TH6pPbstihJ KCR1bza/5hbBUvOWMzedQyRFkKERy69+ZNh3mulF5UTTmpu56bw5HKc9L8Y2ULtC7B2i MnLqnemczVYvvtyDFl5qwDR0QOdl70Nkiblxk19fvdCUMIqc9dAOqzMR2gawrXjmCNH+ Uy+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=JtYc4kFlWttpl431W1Z31uNE2/kfUNJjKMseaeSWMGs=; b=n3iUXYqMPc+J6n83Tc1hOsUr4n/XNjjW6G2txTt0e6UAE+Yugz1DWlMgZM14pKZ+Cq 4t+pZKI8J5rsMzpTIqtkCqzkzwQzwdCfOudJO3J/auFH/IJLsT4Clb/7k9CwD/XBqjFp II/y6lAZ3D707s7gO8iL4lVy1GZUsLu99GdR2PO5E/se0s2RmHWJSe3DzjbMJcwH8rml imQg0O5VPm/Dlfjy8RSaf8cxwKoA6L7yVZ5zyGdL3/VYO1B1x1I0FoFA/QneQoxWi4xq Ui+FRVnD6AM48vbrNGZCSlObGn3uKLrf6unzSUtq2yGDtaDB6xd3wSX2/dtxwTCCrX3m NEVw== X-Gm-Message-State: AJcUukdySAwwX4C4WvoD8WDyDrwIWEFatL+0gI73HscKs9UB6TSt5DeD ofuphwgO22zY8tn3Fp3MGtiaC2sS X-Google-Smtp-Source: ALg8bN4QIAkJ3EMH3U8nBZWg91MDZdSBlela1kWqtS2dEYORf3qOPOvxgebbI0FlSco9r7Q6ktg7bQ== X-Received: by 2002:aca:4489:: with SMTP id r131mr4415215oia.296.1547628392257; Wed, 16 Jan 2019 00:46:32 -0800 (PST) Received: from [192.168.1.10] (ip70-171-116-89.no.no.cox.net. [70.171.116.89]) by smtp.googlemail.com with ESMTPSA id 31sm5564204otw.55.2019.01.16.00.46.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Jan 2019 00:46:31 -0800 (PST) Subject: Re: Read consistency when using synchronous_commit=off To: pgsql-general@lists.postgresql.org References: <5609bb8f-ee85-5e1b-9cb3-7a4ec5458f81@portavita.eu> <0422a97d-59c6-5812-2ba9-7687c564ad94@portavita.eu> <1547553278.1840928.1635056376.7E488891@webmail.messagingengine.com> <1547615808.3470705.1635837968.2703BA66@webmail.messagingengine.com> From: Ron Message-ID: <788bc40e-a378-11a3-8191-865b5bafe4aa@gmail.com> Date: Wed, 16 Jan 2019 02:46:30 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------319AF8CC4A77A0A2861CBAE3" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------319AF8CC4A77A0A2861CBAE3 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit A crash-unsafe database is for data you don't care about. On 1/16/19 2:27 AM, pshadangi wrote: > Thanks Ravi for the clarification, we will go ahead with > "synchronous_commit=off". > > On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna > wrote: > > Sorry I misunderstood.  The term "read consistency" is generally used > either in the context of isolation level or in the context of slaves. > >> We don't have standby instance, as I have mentioned we are using just >> one instance of postgres serving local clients running on the same >> machine, do you know in this case what is the behavior ? >> > > You are good.  All transactions update buffer cache too, along with > WAL buffer and hence other sessions can immediately see the changes. > synchronous_commit=off will only reduce the fsync calls, which makes > them less crash safe, but the database consistency is not compromised. > -- Angular momentum makes the world go 'round. --------------319AF8CC4A77A0A2861CBAE3 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
A crash-unsafe database is for data you don't care about.


On 1/16/19 2:27 AM, pshadangi wrote:
Thanks Ravi for the clarification, we will go ahead with "synchronous_commit=off".

On Wed, Jan 16, 2019 at 10:47 AM Ravi Krishna <srkrishna@fastmail.com> wrote:
Sorry I misunderstood.  The term "read consistency" is generally used either in the context of isolation level or in the context of slaves.

We don't have standby instance, as I have mentioned we are using just one instance of postgres serving local clients running on the same machine, do you know in this case what is the behavior ?


You are good.  All transactions update buffer cache too, along with WAL buffer and hence other sessions can immediately see the changes. synchronous_commit=off will only reduce the fsync calls, which makes them less crash safe, but the database consistency is not compromised.
  


--
Angular momentum makes the world go 'round.
--------------319AF8CC4A77A0A2861CBAE3--