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)