pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzby@telsasoft.com>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: David Steele <david@pgmasters.net>
Cc: Fujii Masao <masao.fujii@oss.nttdata.com>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Paul Guo <guopa@vmware.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Michael Brown <michael.brown@discourse.org>
Cc: pgsql-hackers@postgresql.org, Michael Paquier <michael@paquier.xyz>
Subject: Re: fdatasync performance problem with large number of DB files
Date: Thu, 17 Jun 2021 20:11:01 -0500
Message-ID: <20210618011101.GQ31772@telsasoft.com> (raw)
In-Reply-To: <20210529192321.GM2082@telsasoft.com>
References: <3d1086bd-0881-e0a3-9f4f-bda608f07fdb@oss.nttdata.com>
	<CA+hUKGJyjpuqYq60=zhoMWL5cCJKR_V9FaJtoZUv6nJCdtkPVA@mail.gmail.com>
	<CA+hUKG+jOK-0ZbCAiTwPx8_ajfRs9cAgkFf4BodfQiE9G+3n1w@mail.gmail.com>
	<ca3983c4-0fb3-a64f-c533-ddba3e36b177@oss.nttdata.com>
	<cb8dc397-3376-3d2e-4be0-b986a1c17e82@oss.nttdata.com>
	<CA+hUKGKgj+SN6z91nVmOmTv2KYrG7VnAGdTkWdSjbOPghdtooQ@mail.gmail.com>
	<7716fafe-fcab-3faf-c337-d1e8c6ae6191@pgmasters.net>
	<CA+hUKG+z+ET2-o8cX5XBqPTNzNUXzMAZKP2YU8cgz53cdC65OA@mail.gmail.com>
	<20210526001359.GE3676@telsasoft.com>
	<20210529192321.GM2082@telsasoft.com>

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 <pryzbyj@telsasoft.com>
> 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.
>         </para>
>         <para>
> -        This parameter can only be set at server start.
> +        This parameter can only be set in the <filename>postgresql.conf</filename>
> +        file or on the server command line.
>         </para>
>        </listitem>
>       </varlistentry>
> 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)
>  
>  
>  #------------------------------------------------------------------------------





view thread (49+ messages)  latest in thread

Message-ID: <20210618011101.GQ31772@telsasoft.com>
Permalink:  ../20210618011101.GQ31772@telsasoft.com/
Also on:    postgresql.org/message-id/20210618011101.GQ31772@telsasoft.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzby@telsasoft.com, thomas.munro@gmail.com, david@pgmasters.net, masao.fujii@oss.nttdata.com, bruce@momjian.us, guopa@vmware.com, tgl@sss.pgh.pa.us, michael.brown@discourse.org, michael@paquier.xyz
  Subject: Re: fdatasync performance problem with large number of DB files
  In-Reply-To: <20210618011101.GQ31772@telsasoft.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox