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 1lN9ey-0000PD-3P for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Mar 2021 07:35:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lN9ex-00057g-2J for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Mar 2021 07:35:03 +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 1lN9ew-00057Z-SP for pgsql-hackers@lists.postgresql.org; Fri, 19 Mar 2021 07:35:02 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lN9eu-0001KP-Sw for pgsql-hackers@postgresql.org; Fri, 19 Mar 2021 07:35:02 +0000 Received: from hnk.local (p2350207-ipbf2126funabasi.chiba.ocn.ne.jp [114.167.184.207]) by oss.nttdata.com (Postfix) with ESMTPSA id 8BD74625DC; Fri, 19 Mar 2021 16:34:57 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: fdatasync performance problem with large number of DB files To: Thomas Munro Cc: Bruce Momjian , Paul Guo , Tom Lane , Michael Brown , pgsql-hackers References: <823DAB20-5A5E-4F7B-BF8C-D61FA574DEEA@vmware.com> <76de0e61-a553-6003-aeec-cb35ada791cf@oss.nttdata.com> <52453bfc-40fb-7771-05ee-cbd04b6b9b6e@oss.nttdata.com> <4CB921E5-772B-42F9-B14D-D310E709E8F2@vmware.com> <20210318135411.GB8529@momjian.us> <20210318140352.GC8529@momjian.us> <3d1086bd-0881-e0a3-9f4f-bda608f07fdb@oss.nttdata.com> From: Fujii Masao Message-ID: <10b5b192-21e9-bf28-b22e-ab8ebb9e77d1@oss.nttdata.com> Date: Fri, 19 Mar 2021 16:34:57 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2021/03/19 14:28, Thomas Munro wrote: > On Fri, Mar 19, 2021 at 3:23 PM Fujii Masao wrote: >> Thanks for updating the patch! It looks good to me! >> I have one minor comment for the patch. >> >> + elog(LOG, "could not open %s: %m", path); >> + return; >> + } >> + if (syncfs(fd) < 0) >> + elog(LOG, "could not sync filesystem for \"%s\": %m", path); >> >> Since these are neither internal errors nor low-level debug messages, ereport() should be used for them rather than elog()? For example, > > Fixed. Thanks! LGTM. > I'll let this sit until tomorrow to collect any other feedback or > objections, and then push the 0001 patch > (recovery_init_sync_method=syncfs). Understood. > On Fri, Mar 19, 2021 at 4:08 PM Fujii Masao wrote: >> 0002 patch looks good to me. Thanks! >> I have minor comments. > > Ok, I made the changes you suggested. Thanks! LGTM. > Let's see if anyone else would > like to vote for or against the concept of the 0002 patch > (recovery_init_sync_method=none). Agreed. I also want to hear more opinion about the setting "none". Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION