Re: Vectored IO in XLogWrite() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Vectored IO in XLogWrite()
Date
Msg-id CA+TgmoYBcLvOcEW7CsfapWmwkzYAXDeX9HBT6X7xxRoWbQ=Rrg@mail.gmail.com
Whole thread Raw
In response to Re: Vectored IO in XLogWrite()  (Melih Mutlu <m.melihmutlu@gmail.com>)
List pgsql-hackers
On Tue, Aug 6, 2024 at 6:30 PM Melih Mutlu <m.melihmutlu@gmail.com> wrote:
> Fixed.

+                iov[0].iov_base = XLogCtl->pages + startidx * (Size)
XLOG_BLCKSZ;;

Double semicolon.

Aside from that, this looks correct now, so the next question is
whether we want it. To me, it seems like this isn't likely to buy very
much, but it also doesn't really seem to have any kind of downside, so
I'd be somewhat inclined to go ahead with it. On the other hand, one
could argue that it's better not to change working code without a good
reason.

I wondered whether the regression tests actually hit the iovcnt == 2
case, and it turns out that they do, rather frequently actually.
Making that case a FATAL causes ~260 regression test failure. However,
on larger systems, we'll often end up with wal_segment_size=16MB and
wal_buffers=16MB and then it seems like we don't hit the iovcnt==2
case. Which I guess just reinforces the point that this is
theoretically better but practically not much different.

Any other votes on what to do here?

--
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Greg Sabino Mullane
Date:
Subject: Re: Enable data checksums by default
Next
From: Robert Haas
Date:
Subject: Re: Enable data checksums by default