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 1ln4YY-0000TT-NM for pgsql-hackers@arkaria.postgresql.org; Sat, 29 May 2021 19:23:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ln4YX-0000gT-G4 for pgsql-hackers@arkaria.postgresql.org; Sat, 29 May 2021 19:23:33 +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 1ln4YX-0000cX-3O for pgsql-hackers@lists.postgresql.org; Sat, 29 May 2021 19:23:33 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1ln4YP-0004m7-D9 for pgsql-hackers@postgresql.org; Sat, 29 May 2021 19:23:32 +0000 Received: by mail-il1-x129.google.com with SMTP id b5so6334332ilc.12 for ; Sat, 29 May 2021 12:23:24 -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=EQUp5zS9MXRxxkYV0bnbnUx3mDDch7kbh6MnqF/QWsU=; b=JxYaOR5q33sWL5M8DBMoEDblX24udbVFXZgaeCRGtwHTalvo/IKm+/46usMuGI9dP/ YcyFkU+yUWzXkBynX5HQqgn8ZvhaO0THyjhJ030fAzOl1As4U5jT0QU8Zj3rY9SSci1B jJId+feS+gNFnIjUq05uyvOIXBSkcrayE8XZpwY/0WZADDv+zYV0W++23RIr/PHOU4a6 d+8VspeJrGxwOB8tE2E2eYlNz2ivaKDdJtUA+stsz2ddjeoJJxw9qFLEJkoiwf9mhJjy tDMyIngdmi6FU5SZM12iyHKseUF7X8GiQIi+5jkT4GlXtd81R2IFtKF10yFxe3H2NrpO G5Wg== 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=EQUp5zS9MXRxxkYV0bnbnUx3mDDch7kbh6MnqF/QWsU=; b=Uh/T9R/38k7JnKDhFJTem31gEFyJwmQAiWUjVIMSW99sZtM5F6+dAOZ+oA3wSXXX7T 3/KgQ16QSVgRDWjZJqbb+xl7Y73d7VuozD3lEq9ZFk3WJv+q5DIvd4FY1Mh027Ho7VFo agmjvWgREGDgdGPcgLHZtK/unTdAebK0WvvMpXWJNAmF6XK8CQR5MwBme6p0WsYlCWXo vEJ3B5IIF3tyx7qRWk0pZ9A8yDGWLnlNkk2pHnyRHNnoR4ZYz60v29aLmFzAeEpBHJjN pZrzwvq++YyParPs0BI3Xb8Jt7ZdWIwAPt0P9fA2y0IF0QEu2yjebyBhW/M+iJOY/S9E 8CIQ== X-Gm-Message-State: AOAM53134Wn/btqqoS1uouxPYVUdGr6GONRhULgpOGEsOmelvx5/x7eL bOfUDB8JvlgND6Th+fcyTBLZag== X-Google-Smtp-Source: ABdhPJwyIMnfCId80rLQxhE7YLy1Fl3Mhu9UI5sesBEb0+Gob+lRrhxkiLxLif3tqGj8LS2bDkpATw== X-Received: by 2002:a05:6e02:13d4:: with SMTP id v20mr11733440ilj.111.1622316203218; Sat, 29 May 2021 12:23:23 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id x6sm5085681ilc.59.2021.05.29.12.23.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 May 2021 12:23:22 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id C2C82800A7A; Sat, 29 May 2021 14:23:21 -0500 (CDT) Date: Sat, 29 May 2021 14:23:21 -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: <20210529192321.GM2082@telsasoft.com> References: <20210318140352.GC8529@momjian.us> <3d1086bd-0881-e0a3-9f4f-bda608f07fdb@oss.nttdata.com> <7716fafe-fcab-3faf-c337-d1e8c6ae6191@pgmasters.net> <20210526001359.GE3676@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210526001359.GE3676@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 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) #------------------------------------------------------------------------------