Use pg_pwrite() in pg_test_fsync
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-01-09T20:21:59Z
Lists: pgsql-hackers
Attachments
- 0001-Use-pg_pwrite-in-pg_test_fsync.patch (text/x-patch) patch 0001
Hi, Since pg_test_fsync is supposed to simulate some aspects of PostgreSQL's wal_sync_method settings, I think it should be updated to use the same system calls (which changed in v12). That's mostly on principle, though in practice, on one system I've managed to see a small measurable difference. 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.
Commits
-
Use pg_pwrite() in pg_test_fsync.
- 2c8b42b50df6 14.0 landed