Re: Vectored I/O in bulk_write.c - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Vectored I/O in bulk_write.c
Date
Msg-id CA+hUKG+xgZYDrRNuWxgjJZiuC1nohY58aOhLTuuSsgVDyvY1Kw@mail.gmail.com
Whole thread Raw
In response to Re: Vectored I/O in bulk_write.c  (Heikki Linnakangas <hlinnaka@iki.fi>)
Responses Re: Vectored I/O in bulk_write.c
List pgsql-hackers
On Thu, Mar 14, 2024 at 10:49 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> I tried to say that smgr implementation might have better ways to assert
> that than calling smgrnblocks(), so it would be better to leave it to
> the implementation. But what bothered me most was that smgrwrite() had a
> different signature than mdwrite(). I'm happy with the way you have it
> in the v4 patch.

Looking for other things that can be hoisted up to smgr.c level
because they are part of the contract or would surely need to be
duplicated by any implementation: I think the check that you don't
exceed the maximum possible block number could be there too, no?
Here's a version like that.

Does anyone else want to object to doing this for 17?  Probably still
needs some cleanup eg comments etc that may be lurking around the
place and another round of testing.  As for the overall idea, I'll
leave it a few days and see if others have feedback.  My take is that
this is what bulk_write.c was clearly intended to do, it's just that
smgr let it down by not allowing vectored extension yet.  It's a
fairly mechanical simplification, generalisation, and net code
reduction to do so by merging, like this.

Attachment

pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Combine Prune and Freeze records emitted by vacuum
Next
From: jian he
Date:
Subject: Re: SQL:2011 application time