Re: fdatasync performance problem with large number of DB files

From: Fujii Masao <masao(dot)fujii(at)oss(dot)nttdata(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: 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 <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: fdatasync performance problem with large number of DB files
Date: 2021-03-19 03:08:19
Message-ID: cb8dc397-3376-3d2e-4be0-b986a1c17e82@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021/03/19 11:22, Fujii Masao wrote:
>
>
> On 2021/03/19 10:37, Thomas Munro wrote:
>> On Fri, Mar 19, 2021 at 2:16 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
>>> PS: For illustration/discussion, I've also attached a "none" patch.  I
>>> also couldn't resist rebasing my "wal" mode patch, which I plan to
>>> propose for PG15 because there is not enough time left for this
>>> release.
>>
>> Erm... I attached the wrong version by mistake.  Here's a better one.

0002 patch looks good to me. Thanks!
I have minor comments.

- * Issue fsync recursively on PGDATA and all its contents, or issue syncfs for
- * all potential filesystem, depending on recovery_init_sync_method setting.
+ * Issue fsync recursively on PGDATA and all its contents, issue syncfs for
+ * all potential filesystem, or do nothing, depending on
+ * recovery_init_sync_method setting.

The comment in SyncDataDirectory() should be updated so that
it mentions "none" method, as the above?

+ This is only safe if all buffered data is known to have been flushed
+ to disk already, for example by a tool such as
+ <application>pg_basebackup</application>. It is not a good idea to

Isn't it better to add something like "without <literal>--no-sync</literal>"
to "pg_basebackup" part? Which would prevent users from misunderstanding
that pg_basebackup always ensures that whatever options are specified.

Regards,

--
Fujii Masao
Advanced Computing Technology Center
Research and Development Headquarters
NTT DATA CORPORATION

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Julien Rouhaud 2021-03-19 03:16:50 Re: Feature improvement: can we add queryId for pg_catalog.pg_stat_activity view?
Previous Message Tomas Vondra 2021-03-19 03:07:05 Re: cleanup temporary files after crash