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 1jRsmw-0002xT-Fi for pgsql-committers@arkaria.postgresql.org; Fri, 24 Apr 2020 07:30:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jRsmv-0008Bf-8L for pgsql-committers@arkaria.postgresql.org; Fri, 24 Apr 2020 07:30:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRsmv-000883-2P for pgsql-committers@lists.postgresql.org; Fri, 24 Apr 2020 07:30:17 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jRsmo-0005f5-O6 for pgsql-committers@lists.postgresql.org; Fri, 24 Apr 2020 07:30:16 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id DD2B85C0A47; Fri, 24 Apr 2020 03:30:07 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Fri, 24 Apr 2020 03:30:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=rnMj9LwMDvsUvb8Ql065oab+zL0 TxqXBpJfixasRmpg=; b=X2VPVTbSyBerwOjt0HAC6QQ7uALxe+q20yIjWeLVhmT uUTIp1vVOhylJq+8TChifDMngQmOZGeWJbFQNxBeF+vui+a15FSpXTKA74ae/06O UfBMNIdLFJPZnM1gf93Ixo+2SCshDb82GcH1PJEiam3DWP96DBwBlsaTLG8vtHvE BHvS1eJ7M4hq2quRCrNUzf2M27eB+rSfd2QiAjbNlzMnAZeBVOn1Nh2IFWlXNdMQ PgGaEJTRT3WqiW6j5bB37Ox68n7k6kzfmhMZZxkPwbegyjtL2g4y+Mdm15vpHoAn RkBzXUEwEo80A+ljL/yeMm3AfFnlXWsbEyEc5gUXxiA== 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=rnMj9L wMDvsUvb8Ql065oab+zL0TxqXBpJfixasRmpg=; b=De2Zybhd3AK+a3mBS4A4W6 91f0gCd0J49a1JEav5yXmVH2NcJbgpg+xp0t212OBf9noglUktHdmaHAEwbN7tPz TgSkU6MqmPwYfiB1XC5Li4ROlCcJsY9SpZudJ1ZtCYHYFFNW06Gjp8MP1h4+oxI5 9qg3cfGTrIFg/hdydULgPKYZFS/5kNWPCNGVQ9wy8+l8r6ZtP+99CBkmI73RzO5K lfAXXuarTJEVc/aWRakijoOP+piLTzxpxcZUXnK00Ae0N9nWmm/8OzDtdhB4tyNk G+e1a3q8Y4CkLsmaF7w5guIi6OVE3cOgu9bUPFc+1LA1XRKvzXc30ZkpVEtBY8GA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrhedtgddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlse hprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 87743328006B; Fri, 24 Apr 2020 03:30:05 -0400 (EDT) Date: Fri, 24 Apr 2020 16:29:41 +0900 From: Michael Paquier To: Noah Misch Cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Skip WAL for new relfilenodes, under wal_level=minimal. Message-ID: <20200424072941.GQ33034@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3a/Z8KDuKqDOIvAo" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --3a/Z8KDuKqDOIvAo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Noah, On Sat, Apr 04, 2020 at 08:40:43PM +0000, Noah Misch wrote: > Skip WAL for new relfilenodes, under wal_level=3Dminimal. >=20 > Until now, only selected bulk operations (e.g. COPY) did this. If a > given relfilenode received both a WAL-skipping COPY and a WAL-logged > operation (e.g. INSERT), recovery could lose tuples from the COPY. See > src/backend/access/transam/README section "Skipping WAL for New > RelFileNode" for the new coding rules. Maintainers of table access > methods should examine that section. >=20 > To maintain data durability, just before commit, we choose between an > fsync of the relfilenode and copying its contents to WAL. A new GUC, > wal_skip_threshold, guides that choice. If this change slows a workload > that creates small, permanent relfilenodes under wal_level=3Dminimal, try > adjusting wal_skip_threshold. Users setting a timeout on COMMIT may > need to adjust that timeout, and log_min_duration_statement analysis > will reflect time consumption moving to COMMIT from commands like COPY. + /* + * Records other than SWITCH_WAL must have content. We use an integer 0= to + * follow the restriction. + */ This commit has added the following comment, but I guess you meant XLOG_SWITCH instead? -- Michael --3a/Z8KDuKqDOIvAo Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl6ilWUACgkQnvQgOdby QH19VQ/+O3f4rJ/uFl/qz7y05IWvUlKV4FppC8T6R85N3+noyV+WdEXfDbma6uW+ YTzSv85NTUU2dloBe1yzQlZ/7eEcsgBoS5Pu9O0fa47QOSGAaPtFptWNe874sg9A 0P9B1PFuOMjyL/jww4M+BU6bJ9qWAVI/DJJaPGaTHsKJoA5S7BygdrBg6qcl6C6F K0rFAyV5PGZ+qj9zA3L3j61EIIz35lQfMOaeUHi7EskhEifYpkYK9PsAhQ4JVgO1 svcGoOFfR1QBSvyB7zPYz4J0EsFf5fTP6cyjZzB5JKSWPUX7QnwYK3cq4jv/quLi 303OEhkrsI+FcXJDL+nHAa3hNVdIvQNT3CSGF6VkHnh61YH79DlxxljQED22aWmh RXhrRL+s+4FMcle45iktyjJGPn5Bgt5POKxvvaYVEdJH5giKhewdVjTg1OsV1kuU ugrkre9Zm0pYg9TS67ELIVAKhK2JU53brA+676PU2RHtclkn1IpbVr/JqiPkjCZr DrWUpbbBhjrMC7WUcXOBTe9Lxmrx+JP3CN5/JuaexJDnQiiGfL56/lrWENHOI8r7 Xnaw5Lq858PhNaIPFUbBrUMs1rI1jBt/bH+KHc2ncdmJ9vmHYBrs3dywmz65QZrl FN0U9qzXHOKuwR4glyBs+XNnpseI+6eS8wVrPXXaB+Qz5EwTBxA= =SA8j -----END PGP SIGNATURE----- --3a/Z8KDuKqDOIvAo--