pgsql: Use pg_pwrite() in pg_test_fsync.

From: Thomas Munro <tmunro(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use pg_pwrite() in pg_test_fsync.
Date: 2021-02-15 02:24:14
Message-ID: E1lBTYc-0006TP-TU@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use pg_pwrite() in pg_test_fsync.

For consistency with the PostgreSQL behavior this test program is
intended to simulate, use pwrite() instead of lseek() + write().

Also fix the final "non-sync" test, which was opening and closing the
file for every write.

Discussion: https://postgr.es/m/CA%2BhUKGJjjid2BJsvjMALBTduo1ogdx2SPYaTQL3wAy8y2hc4nw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2c8b42b50df6cc5ba6987c400a857d6bbfdf0300

Modified Files
--------------
src/bin/pg_test_fsync/pg_test_fsync.c | 51 +++++++++++++++++++----------------
1 file changed, 28 insertions(+), 23 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2021-02-15 03:23:04 pgsql: Default to wal_sync_method=fdatasync on FreeBSD.
Previous Message Amit Kapila 2021-02-15 02:06:43 pgsql: Fix the warnings introduced in commit ce0fdbfe97.