public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Why do spgbuildempty(), btbuildempty(), and blbuildempty() use smgrwrite()?
Date: Thu, 03 Mar 2022 11:57:23 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAAKRu_b6-NX8OKs02_WRcyuDwf0qBsRa7-Ecp3dGMxKHokzTMQ@mail.gmail.com>
References: <CAAKRu_b6-NX8OKs02_WRcyuDwf0qBsRa7-Ecp3dGMxKHokzTMQ@mail.gmail.com>
At Wed, 2 Mar 2022 20:07:14 -0500, Melanie Plageman <[email protected]> wrote in
> If you enable the CHECK_WRITE_VS_EXTEND-protected assert in mdwrite(),
> you'll trip it anytime you exercise btbuildempty(), blbuildempty(), or
> spgbuildempty().
>
> In this case, it may not make any meaningful difference if smgrwrite()
> or smgrextend() is called (_mdfd_getseg() behavior won't differ even
> with the different flags, so really only the FileWrite() wait event will
> be different).
> However, it seems like it should still be changed to call smgrextend().
> Or, since they only write a few pages, why not use shared buffers like
> gistbuildempty() and brinbuildempty() do?
>
> I've attached a patch to move these three into shared buffers.
>
> And, speaking of spgbuildempty(), there is no test exercising it in
> check-world, so I've attached a patch to do so. I wasn't sure if it
> belonged in spgist.sql or create_index_spgist.sql (on name alone, seems
> like the latter but based on content, seems like the former).
>
> - Melanie
I didn't dig into your specific isssue, but I'm mildly opposed to
moving them onto shared buffers. They are cold images of init-fork,
which is actually no-use for active servers. Rather I'd like to move
brinbuildempty out of shared buffers considering one of my proposing
patches..
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (3+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Why do spgbuildempty(), btbuildempty(), and blbuildempty() use smgrwrite()?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox