Re: fdatasync performance problem with large number of DB files

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>
Cc: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, David Steele <david(at)pgmasters(dot)net>, Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>, Bruce Momjian <bruce(at)momjian(dot)us>, Paul Guo <guopa(at)vmware(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Brown <michael(dot)brown(at)discourse(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: fdatasync performance problem with large number of DB files
Date: 2021-06-04 07:24:02
Message-ID: YLnVEvpJ4+ObuUIv@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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 ?
>
> 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Nancarrow 2021-06-04 07:25:53 Re: pg_stat_progress_create_index vs. parallel index builds
Previous Message Kyotaro Horiguchi 2021-06-04 07:21:35 Re: Duplicate history file?