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 1hEK8U-00011f-Rs for pgsql-docs@arkaria.postgresql.org; Wed, 10 Apr 2019 20:47:59 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hEK8T-0003oU-I9 for pgsql-docs@arkaria.postgresql.org; Wed, 10 Apr 2019 20:47:57 +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 1hEK8R-0003oN-Ja for pgsql-docs@lists.postgresql.org; Wed, 10 Apr 2019 20:47:57 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hEK8N-00078T-3X for pgsql-docs@lists.postgresql.org; Wed, 10 Apr 2019 20:47:55 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B3E4821A84; Wed, 10 Apr 2019 16:47:49 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 10 Apr 2019 16:47:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=6flUdTXcGA941aGZdmtsWrOQK87 Ab7r9SppWQKLyxVA=; b=fedAkdvdmkw6o+vawiGdrevCfoK7h1W0i/s7ihtP4yl XWrTk7ipQf9MWig+LBL1RPkGPvuBYgVHZugaRtHpgzeGm/cZFSozbjXn0kSRXPVI QiJi50XW9QrZhpbVEgWjox5kKpVB49Qe5O/3tNlM34L8vzjdUBdHgw8wdxkFJ7hR 23AFvUQu+Mna1zq6Px/maJFUfcB+JnOVuTDdHdJGjNSwKTyXxlpvon1XMbidm7Mo 3f6ewmpTHg6+IrzRdPyMHS2Lx00Soq0LXFGdwOoam+azVvZpFYBR31xoddKVC+ty C0sitEg+qkuoV32ls12sGzptOOjMSRb7eTwdTrs9R7A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6flUdT XcGA941aGZdmtsWrOQK87Ab7r9SppWQKLyxVA=; b=W4M4eD/Di2D238xDX3tA5L ov5FqRn5yMYItKMIFvZaXpMMbu5fmxmTaKI396wUqYOwid7KN7txJPYAYF93/dbY 0ujJB/wADOfCUEvd4jyR+DyryOfr0OXtaLKYpx+z8H1UfFY+CJfMQWy6rU3vN26z y4xVQJwatLmlxUNKrtCyotgXpVwgrTMLvi6YsUvs3bnl2CuGZjmUhw6K2dz7b2Zb +dJ1+EJitoX4GWpeS9Mviwqxr5+xFfhC8k3/yhCL3aPnDmmsW/8UTQw4jD9UnTNI aVOW7E8SABmdoo51vZCoVe1F8BZNtuFyfHqVD87eYqQNUnxrIymLRrUdjHvoMnVw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudejgdduheehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucffohhmrg hinhepphhoshhtghhrvghsqhhlrdhorhhgnecukfhppeelkedrvddutddrudegtddrudej udenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgriigvlhdrug gvnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from intern.anarazel.de (c-98-210-140-171.hsd1.ca.comcast.net [98.210.140.171]) by mail.messagingengine.com (Postfix) with ESMTPA id F165810398; Wed, 10 Apr 2019 16:47:48 -0400 (EDT) Date: Wed, 10 Apr 2019 13:47:47 -0700 From: Andres Freund To: Bruce Momjian Cc: imre.gabesz@gmail.com, pgsql-docs@lists.postgresql.org Subject: Re: 30.3. Asynchronous Commit Message-ID: <20190410204747.kodthrzgwszeftdj@alap3.anarazel.de> References: <155368953491.9806.1253077077613006580@wrigleys.postgresql.org> <20190410200610.vhij57iz2xzottiu@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190410200610.vhij57iz2xzottiu@momjian.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2019-04-10 16:06:10 -0400, Bruce Momjian wrote: > On Wed, Mar 27, 2019 at 12:25:34PM +0000, PG Doc comments form wrote: > > The following documentation comment has been logged on the website: > > > > Page: https://www.postgresql.org/docs/9.6/wal-async-commit.html > > Description: > > > > How do async commits and unlogged tables relate? You might add a paragraph > > on clarifying this relation. > > https://www.postgresql.org/docs/9.6/wal-async-commit.html > > Async commit controls the WAL writes for _logged_ tables. Unlogged > tables don't generate WAL, since they are not crash safe, and hence are > not affected by async commit. That's not quite true, I think. Async commit is a question that only matters at commit time. Logged/Unlogged only matters insofar as it determines whether WAL has been written up ot that point. Currently we *always* perform an async commit if a transaction didn't write any WAL, even if an xid has been assigned (but we'll log a commit record). But even transactions that only write to unlogged tables can easily have WAL assigned - e.g. hot pruning in catalog tables or during reads from user defined logged tables; or enough subtransactions were used that an xid assigment record had to be written; or some logged table (including catalog tables) was accessed, and a hit bit had been set, and wal_log_hint bits were set, and a lot of other reasons. Thus I think it's wrong to say that async commit doesn't mean anything for unlogged tables. I'd also say that it's not correct to say that async commit really controls WAL writes at all. It's just whether we *flush* the commit record, or not. Greetings, Andres Freund