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

From Heikki Linnakangas
Subject Re: Vectored I/O in bulk_write.c
Date
Msg-id b82e8ed1-d88f-4f9a-b739-ba55a2596748@iki.fi
Whole thread Raw
In response to Re: Vectored I/O in bulk_write.c  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Vectored I/O in bulk_write.c
List pgsql-hackers
On 13/03/2024 23:12, Thomas Munro wrote:
> Alright, here is a first attempt at merging all three interfaces as
> you suggested.  I like it!  I especially like the way it removes lots
> of duplication.
> 
> I don't understand your argument about the location of the
> write-vs-extent assertions.  It seems to me that these are assertions
> about what the *public* smgrnblocks() function returns.  In other
> words, we assert that the caller is aware of the current relation size
> (and has some kind of interlocking scheme for that to be possible),
> according to the smgr implementation's public interface.  That's not
> an assertion about internal details of the smgr implementation, it's
> part of the "contract" for the API.

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.

-- 
Heikki Linnakangas
Neon (https://neon.tech)




pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Vectored I/O in bulk_write.c
Next
From: Corey Huinker
Date:
Subject: Re: Statistics Import and Export