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 1lp4Bq-00029u-9Z for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Jun 2021 07:24:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lp4Bo-0000CG-UO for pgsql-hackers@arkaria.postgresql.org; Fri, 04 Jun 2021 07:24:20 +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 1lp4Bo-0000C8-7l for pgsql-hackers@lists.postgresql.org; Fri, 04 Jun 2021 07:24:20 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lp4Bl-0004Wm-Ov for pgsql-hackers@postgresql.org; Fri, 04 Jun 2021 07:24:19 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id D32CC5C0116; Fri, 4 Jun 2021 03:24:15 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Fri, 04 Jun 2021 03:24:15 -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=MphkghLEgfJCzDzJb8xzOlRbDLu oCPvfHXOI6FXTWJw=; b=eeQ8d66fCyhBFZIpF6yPgFrNzojT7o76FB7riil2uh3 BlPPSevW9lK0SyS6lK9p28AL6oTP5vwN5ZU+lQaL34b7WKdULTc+fAVX7SnA6wNl IYPugy9EMS/XXfk1Sd+oxbKR4Cv3wtumvOWTe3dVzNZvTVaatWYtNBeRfd69bh4F kW3gl78luNxQ7A220zgAMLGMi0WbPSbwIcphDiYYdVGSBNnHvtMgF6vGGuacSBq8 p3Wb6i54mADYWlX6gcnMGj3k+sa5qj8LZebOlF11onDGhcaarQTGDhagkfBgq4Dm d6lTpfJKmQXwsX77Y0mL0SqQl0T9nlmAx3t8v5r3QxA== 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=fm3; bh=Mphkgh LEgfJCzDzJb8xzOlRbDLuoCPvfHXOI6FXTWJw=; b=Laotjz+/ATNcoQ3ECQoI1X yR0e+aaB75xjCy658RdCGsaf5/H/vO9hn7oCwdBxMxsHWe/lhGhpOE2Vkv4PHXdH 5ApICkGGnMqOweEfxXJ8rOWfEAXBnGq7I3hdghpwZsUYHs3+hJsUQpB8i3RThMFd pZjZdsfoCFRQxdg6LxWlY7YXZfS5gBV3zFqlhyML3TAhqxlhscfWFDswC0JsS1FJ QzFUIg3Ej6b80b5yFfiSGgTJHZyaSBy/Q7zyHPbdvmTQ2twc7bWxwELWR5wwNdyi MOObRD3rypbaZEsMdTIkmIAWvYI+hFenJRyhKCCJKPYNNLzX6j74c60s9Rnowe4A == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedttddguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveej heehieevueeigeelteegleejleeiueeiheegvefhnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Jun 2021 03:24:10 -0400 (EDT) Date: Fri, 4 Jun 2021 16:24:02 +0900 From: Michael Paquier To: Justin Pryzby Cc: Thomas Munro , David Steele , Fujii Masao , Bruce Momjian , Paul Guo , Tom Lane , Michael Brown , pgsql-hackers@postgresql.org Subject: Re: fdatasync performance problem with large number of DB files Message-ID: References: <3d1086bd-0881-e0a3-9f4f-bda608f07fdb@oss.nttdata.com> <7716fafe-fcab-3faf-c337-d1e8c6ae6191@pgmasters.net> <20210526001359.GE3676@telsasoft.com> <20210529192321.GM2082@telsasoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Mmq1ObpWYAuIi0ve" Content-Disposition: inline In-Reply-To: <20210529192321.GM2082@telsasoft.com> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Mmq1ObpWYAuIi0ve Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, May 29, 2021 at 02:23:21PM -0500, Justin Pryzby wrote: > On Tue, May 25, 2021 at 07:13:59PM -0500, Justin Pryzby wrote: >> On Sat, Mar 20, 2021 at 12:16:27PM +1300, Thomas Munro wrote: >> > > > + { >> > > > + {"recovery_init_sync_method", PGC_POSTMASTER, ERROR_= HANDLING_OPTIONS, >> > > > + gettext_noop("Sets the method for synchroniz= ing the data directory before crash recovery."), >> > > > + }, >>=20 >> Is there any reason why this can't be PGC_SIGHUP ? >=20 > I can't see any reason why this is nontrivial. I think that we had better let recovery_init_sync_method as PGC_POSTMASTER, to stay on the safe side. SyncDataDirectory() only gets called now in the backend code by the startup process after a crash at the beginning of recovery, so switching to PGC_SIGHUP would have zero effect to begin with. Now, let's not forget that SyncDataDirectory() is a published API, and if anything exterior were to call that, it does not seem right to me to make that its behavior reloadable at will. -- Michael --Mmq1ObpWYAuIi0ve Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmC51RIACgkQnvQgOdby QH0QAw/+KWT2X3kP+nAHoIp9pvz+0JTYt8ab4+iOzBd9cvkyzKLQGjDEA/Q5FOuy PORy/8JLHrDqE25bVRXynNrzeWEXsP2Cmvbaa8q1yGDrm+QI8WPHlaNrezS2mpod c29Prl71M79k+l2ClXtWffBEj1t6jykKZkuyvq8W2biw4jeqsVAQLg8otYlIivwL 8UUxHky09QOd07qqXm+KmoTBA5nrDNQP2qbVDgtcTYvbRqwSI9KrJ19zr6FPL/Ea 5nc9ykZmUbl0JJtPgCaDFoQtYoLpqfqEkpQv3jhMihL+ZtdwCHbeNKX48a6W9q+Q HOcSLGAywTRQtE6VieXFCHR12GLfTwlkf24mJMklEV/pTJL/YXSMxThs/+A9wRa8 E+uHos7kZMYJMu7mrLsZglvhLH4NiJFDHNpwsBMhWABGIhld1kvp4lpM5xI9Hk/y ibrl6fMMNj1aM0KyA4rIwWFqXIoBykoUvhIZsi6cY/QBUiE2/h+5DamqPo6kp1SS y+xpzE6vfqb0WqkwUYPSA0jxcelGEwYDbrK2Iqo9kj4d3g3olKy0qsC9SqzXYfdF mICNb330vSQkq7aoRDlOksWFOdxpTBDGyKkjWdlTnb4g7+q1q2zV4hV594Tzct8z OsT2Xcb7aG7WZZnfMI51lh1+gvWj0mmFSpNcvVPB9cf5USJSfNA= =XvIE -----END PGP SIGNATURE----- --Mmq1ObpWYAuIi0ve--