Re: Addition of --no-sync to pg_upgrade for test speedup

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Addition of --no-sync to pg_upgrade for test speedup
Date: 2021-12-18 09:30:23
Message-ID: Yb2qLxNoAb4uF6n1@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 17, 2021 at 09:47:05AM -0500, Bruce Momjian wrote:
> On Fri, Dec 17, 2021 at 10:21:04AM +0100, Peter Eisentraut wrote:
>> I think that is reasonable.

Thanks. I have applied that, as that really helped here.

>> Maybe we could have some global option, like some environment variable, that
>> enables the "sync" mode in all tests, so it's easy to test that once in a
>> while. Not really a requirement for your patch, but an idea in case this is
>> a concern.
>
> Yes, I think it would be good to see all the places we might want to
> pass the no-sync option.

The remaining places in src/bin/ that I can see are pg_resetwal, where
we would fsync() a WAL segment full of zeros, and pg_recvlogical
OutputFsync(), which does not point to much data, I guess. The first
one may be worth it, but that's just 16MB we are talking about and
WriteEmptyXLOG() is not a code path taken currently by the tests.

We could introduce a new environment variable if one wishes to enforce
those flushes, say PG_TEST_SYNC, on top of patching any TAP test that
has a --no-sync to filter it out.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2021-12-18 11:29:22 Refactoring of compression options in pg_basebackup
Previous Message Damir Belyalov 2021-12-18 08:55:24 Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)