Re: Vectored IO in XLogWrite()

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Vectored IO in XLogWrite()
Date: 2024-08-08 17:25:47
Message-ID: CA+TgmoYBcLvOcEW7CsfapWmwkzYAXDeX9HBT6X7xxRoWbQ=Rrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 6, 2024 at 6:30 PM Melih Mutlu <m(dot)melihmutlu(at)gmail(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2024-08-08 17:42:55 Re: Enable data checksums by default
Previous Message Greg Sabino Mullane 2024-08-08 17:19:14 Re: Enable data checksums by default