Re: Vectored I/O in bulk_write.c

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Vectored I/O in bulk_write.c
Date: 2024-03-13 21:49:49
Message-ID: b82e8ed1-d88f-4f9a-b739-ba55a2596748@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Corey Huinker 2024-03-13 22:33:14 Re: Statistics Import and Export
Previous Message Thomas Munro 2024-03-13 21:12:32 Re: Vectored I/O in bulk_write.c