Re: Use pg_pwrite() in pg_test_fsync

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use pg_pwrite() in pg_test_fsync
Date: 2021-02-15 02:24:25
Message-ID: CA+hUKG++1mm2Pr9KzoKr3E1+U=_wm7QQR6mRwQQ1QL0JwrJoxQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Jan 24, 2021 at 1:50 PM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> On Sun, Jan 10, 2021 at 9:21 AM Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:
> > I left the fsync-after-closing and non-sync'd tests using write(),
> > because they weren't using lseek(). The latter case is arguably a bit
> > odd because it's not overwriting pre-allocated blocks, unlike the
> > earlier tests.
>
> On closer inspection, the weird thing about that final test is that
> it's opening and closing the file every time. That doesn't seem to
> make any sense. Perhaps it's a copy and paste error from the previous
> test? In v2 I changed it to pg_pwrite(), and moved the open and close
> calls out of the loop.

Pushed.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiro Ikeda 2021-02-15 02:32:12 Re: About to add WAL write/fsync statistics to pg_stat_wal view
Previous Message Justin Pryzby 2021-02-15 02:10:50 Re: Allow CLUSTER, VACUUM FULL and REINDEX to change tablespace on the fly