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: Use pg_pwrite() in pg_test_fsync
Date: 2021-01-09 20:21:59
Message-ID: CA+hUKGJjjid2BJsvjMALBTduo1ogdx2SPYaTQL3wAy8y2hc4nw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

Attachment Content-Type Size
0001-Use-pg_pwrite-in-pg_test_fsync.patch text/x-patch 3.8 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Justin Pryzby 2021-01-09 20:31:19 Re: libpq compression
Previous Message Dian M Fay 2021-01-09 19:02:04 Re: [HACKERS] [PATCH] Generic type subscripting