Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUYVJ-0004cI-3Z for pgsql-admin@arkaria.postgresql.org; Fri, 01 May 2020 16:27:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jUYVH-0002Ik-KN for pgsql-admin@arkaria.postgresql.org; Fri, 01 May 2020 16:27:07 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUYVH-0002Id-Aw for pgsql-admin@lists.postgresql.org; Fri, 01 May 2020 16:27:07 +0000 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUYVE-0008JH-KH for pgsql-admin@lists.postgresql.org; Fri, 01 May 2020 16:27:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1588350425; x=1619886425; h=from:to:cc:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:subject; bh=+pedFUMVK6ey5KQBxfpiCFiPc/qyAOeTMMrR4p6XDNs=; b=URv2FFiYV59wJxP0Vp+lRCfQGXt3WA8O0tmi1dlflJB7XXXSXkINtQeR S1A+2XjFMARMmcTJ/Sl918ZOgXpEYQ+EN9P+jYAuylafaoJ2j/nSAILAA nZaQCWwD/QLuJYloKBae/0cYf2jsbPeKMd9dgcqK6yTRT8QkO369u7byn g=; IronPort-SDR: Mqixm7fp02wZHOD+r/BM87ek4rzs2FSzGK3ylxeHxBhjgCD6thMiA4iYiTY/AJpy0yoPTIxo39 JrUXQFePsZWg== X-IronPort-AV: E=Sophos;i="5.73,340,1583193600"; d="scan'208";a="32351949" Subject: RE: Commit Delay Thread-Topic: Commit Delay Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-119b4f96.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 01 May 2020 16:27:01 +0000 Received: from EX13MTAUWC001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-119b4f96.us-west-2.amazon.com (Postfix) with ESMTPS id 626A01A3966; Fri, 1 May 2020 16:27:00 +0000 (UTC) Received: from EX13D14UWC004.ant.amazon.com (10.43.162.99) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 1 May 2020 16:26:59 +0000 Received: from EX13D14UWC004.ant.amazon.com (10.43.162.99) by EX13D14UWC004.ant.amazon.com (10.43.162.99) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 1 May 2020 16:26:59 +0000 Received: from EX13D14UWC004.ant.amazon.com ([10.43.162.99]) by EX13D14UWC004.ant.amazon.com ([10.43.162.99]) with mapi id 15.00.1497.006; Fri, 1 May 2020 16:26:59 +0000 From: "Thawley, Peter" To: Bruce Momjian , Naveen Sankineni CC: "pgsql-admin@lists.postgresql.org" Thread-Index: AQHWH0eNrryXe5c1u06E4idjqg7n2qiSURAAgAEXPBA= Date: Fri, 1 May 2020 16:26:59 +0000 Message-ID: <7cee0732a2ac4a479b5da94a6cb2693f@EX13D14UWC004.ant.amazon.com> References: <20200430233354.GB31272@momjian.us> In-Reply-To: <20200430233354.GB31272@momjian.us> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.162.53] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi Naveen I was a little confused by this question so perhaps my interpretation is no= t accurate but given we are talking about data loss, I felt compelled to re= spond. Turning off "synchronous commit" means that the application session= will get a success back from the API call before the physical i/o is ackno= wledged. This does risk data loss and should only be done in application u= se cases where it really makes sense. =20 If you want to improve performance of write throughput in wal operations bu= t not risk potential data loss, you should probably increase "commit_delay"= to encourage more concurrent write sessions to group their commits into fe= wer writes. The writer sessions will still wait for the synchronous write = operation so latency will increase slightly but you may see decreased write= s. Peter Thawley Amazon Aurora & RDS Database Service team, AWS =A0=A0=A0=A0=A0=A0 -----Original Message----- From: Bruce Momjian =20 Sent: Thursday, April 30, 2020 4:34 PM To: Naveen Sankineni Cc: pgsql-admin@lists.postgresql.org Subject: RE: [EXTERNAL] Commit Delay CAUTION: This email originated from outside of the organization. Do not cli= ck links or open attachments unless you can confirm the sender and know the= content is safe. On Thu, Apr 30, 2020 at 07:31:01PM -0400, Naveen Sankineni wrote: > Hello , > > I would need your advice on which parameter is least impacted in terms=20 > of Data Loss if we wanted to set . > One of our Database is waiting on I/O when there is a batch operation=20 > that runs to Insert/Delete table data is impacting the small updates=20 > that runs on a continuous basis where it shows that wait is on walwritel= ock. > > commit_delay > synchronous_commit The full list is here: https://www.postgresql.org/docs/12/non-durability.html I would say synchronous_commit. -- Bruce Momjian https://momjian.us EnterpriseDB https://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +