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 1lu32R-000184-Ev for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 01:11:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lu32Q-0007Tz-Bh for pgsql-hackers@arkaria.postgresql.org; Fri, 18 Jun 2021 01:11:14 +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 1lu32Q-0007Tq-10 for pgsql-hackers@lists.postgresql.org; Fri, 18 Jun 2021 01:11:14 +0000 Received: from mail-io1-xd30.google.com ([2607:f8b0:4864:20::d30]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lu32G-0000Rx-6E for pgsql-hackers@postgresql.org; Fri, 18 Jun 2021 01:11:08 +0000 Received: by mail-io1-xd30.google.com with SMTP id k16so5215617ios.10 for ; Thu, 17 Jun 2021 18:11:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JVU9rvQJzIs9l9gpXqkCYCM5SvmLKTqXOjms4iTaSjc=; b=vYCKo1ejt1Y8fJg7+CI3It4yJb5fo+te2l3Kxcd8D4Q2wKq9GR8WGpFMzJ/jtee8f5 gakHr9BChWIOpKt/9uD2VhSNjz4+Cvp57uP8OzEsSmu5mWARWaCjX9XoqEXGHX5t+197 g/c2aValyzvOIm5nddOcvc4YxY4YwVxCNEMG4vIU44eMAMuSo0n48xAPTeqldMHumH5Z eL7sdf2MLCI+gGcGoRbitmfE4My8/iXI30Z7u7kYWDF9yxFcnENGY4fpZnXvvu0durV8 QcIELv0swwiIWuMroDvALjpWLuiYb160DwmoMaU842UJ4HF9rwJbG8x2xxCwaRTS6pva l0Dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JVU9rvQJzIs9l9gpXqkCYCM5SvmLKTqXOjms4iTaSjc=; b=eR3otWJMKeql6qQJlYMQ6Qctu58v0QcopHV/4CQ8dl4angFO0LpwQYv3XSeyUGw+dI WebkiSsbSAd13RmxeV4IDQv1D7bYTHcpNXiw262igfbWv2KX5b92DjIInhbFVesAobLj NyRZ/zUH2nS97GM5F8tY3gdemh6wNs8ms2xRKLpl+iwezJ2rYy0LVJ8e/H3W8/MF4+9D GviOCWWAHhoZ5gOOTH1ynvyFj10U/pDFsMS1zMjmBM2Bdyk9gi0HrinJG/sQqquZymYf vBPbVXE6NGzIVJRuI4pOC8qyZV82sDQi4rBmEJkgqVPhGYbL0yt6579VE8eOfmlfG+gD 9zqw== X-Gm-Message-State: AOAM533TaZJk2GPktQqoJgCjEZDf1Tvluxo8NhAbWZHw9Pb4b1mwdM7M mc/LAD4nwzD+skCxS0SKuBKpWQ== X-Google-Smtp-Source: ABdhPJys0v6Ib3mD+aQzdloEnyGCn+J/u8A6fyDPXXzt291aRXoTgqxM/bTUlsKOxN5fl7SuWNS25A== X-Received: by 2002:a02:1988:: with SMTP id b130mr915512jab.44.1623978663011; Thu, 17 Jun 2021 18:11:03 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id f11sm3644634ioq.36.2021.06.17.18.11.02 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jun 2021 18:11:02 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 8D347800AE5; Thu, 17 Jun 2021 20:11:01 -0500 (CDT) Date: Thu, 17 Jun 2021 20:11:01 -0500 From: Justin Pryzby To: Thomas Munro Cc: David Steele , Fujii Masao , Bruce Momjian , Paul Guo , Tom Lane , Michael Brown , pgsql-hackers@postgresql.org, Michael Paquier Subject: Re: fdatasync performance problem with large number of DB files Message-ID: <20210618011101.GQ31772@telsasoft.com> 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210529192321.GM2082@telsasoft.com> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Thomas, could you comment on this ? 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 synchronizing the data directory before crash recovery."), > > > > > + }, > > > > Is there any reason why this can't be PGC_SIGHUP ? > > (Same as restart_after_crash, remove_temp_files_after_crash) > > I can't see any reason why this is nontrivial. > What about data_sync_retry? > > commit 2d2d2e10f99548c486b50a1ce095437d558e8649 > Author: Justin Pryzby > Date: Sat May 29 13:41:14 2021 -0500 > > Change recovery_init_sync_method to PGC_SIGHUP.. > > The setting has no effect except during startup. > But it's nice to be able to change the setting dynamically, which is expected > to be pretty useful to an admin following crash recovery when turning the > service off and on again is not so appealing. > > See also: 2941138e6, 61752afb2 > > diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml > index d8c0fd3315..ab9916eac5 100644 > --- a/doc/src/sgml/config.sgml > +++ b/doc/src/sgml/config.sgml > @@ -9950,7 +9950,8 @@ dynamic_library_path = 'C:\tools\postgresql;H:\my_project\lib;$libdir' > appear only in kernel logs. > > > - This parameter can only be set at server start. > + This parameter can only be set in the postgresql.conf > + file or on the server command line. > > > > diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c > index 87bc688704..796b4e83ce 100644 > --- a/src/backend/utils/misc/guc.c > +++ b/src/backend/utils/misc/guc.c > @@ -4945,7 +4945,7 @@ static struct config_enum ConfigureNamesEnum[] = > }, > > { > - {"recovery_init_sync_method", PGC_POSTMASTER, ERROR_HANDLING_OPTIONS, > + {"recovery_init_sync_method", PGC_SIGHUP, ERROR_HANDLING_OPTIONS, > gettext_noop("Sets the method for synchronizing the data directory before crash recovery."), > }, > &recovery_init_sync_method, > diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample > index ddbb6dc2be..9c4c4a9eec 100644 > --- a/src/backend/utils/misc/postgresql.conf.sample > +++ b/src/backend/utils/misc/postgresql.conf.sample > @@ -774,7 +774,6 @@ > # data? > # (change requires restart) > #recovery_init_sync_method = fsync # fsync, syncfs (Linux 5.8+) > - # (change requires restart) > > > #------------------------------------------------------------------------------