public inbox for [email protected]
help / color / mirror / Atom feedFrom: Amit Kapila <[email protected]>
To: Melanie Plageman <[email protected]>
Cc: Pg Hackers <[email protected]>
Cc: Robert Haas <[email protected]>
Subject: Re: why do hash index builds use smgrextend() for new splitpoint pages
Date: Sat, 26 Feb 2022 09:47:21 +0530
Message-ID: <CAA4eK1KN1kozZFu7_A_3oT-ypx-2mP8BcNfKdv7kjv1-6u=6iw@mail.gmail.com> (raw)
In-Reply-To: <CAAKRu_ZnNM-FAYNOsgFD6JT9_c0Dc5b61atykpy_9sAhevLh9g@mail.gmail.com>
References: <CAAKRu_b_A0Z+eRHro1wu+6Nmo_+A-RYh+wi-j85OJwmYeqB-Ag@mail.gmail.com>
<CAA4eK1+e5g9utoXV5K4u5QXfwDm5eF5AXMjQkvY357M3Y9gipA@mail.gmail.com>
<CAAKRu_ZnNM-FAYNOsgFD6JT9_c0Dc5b61atykpy_9sAhevLh9g@mail.gmail.com>
On Sat, Feb 26, 2022 at 3:01 AM Melanie Plageman
<[email protected]> wrote:
>
> Since _hash_alloc_buckets() WAL-logs the last page of the
> splitpoint, is it safe to skip the smgrimmedsync()? What if the last
> page of the splitpoint doesn't end up having any tuples added to it
> during the index build and the redo pointer is moved past the WAL for
> this page and then later there is a crash sometime before this page
> makes it to permanent storage. Does it matter that this page is lost? If
> not, then why bother WAL-logging it?
>
I think we don't care if the page is lost before we update the
meta-page in the caller because we will try to reallocate in that
case. But we do care after meta page update (having the updated
information about this extension via different masks) in which case we
won't lose this last page because it would have registered the sync
request for it via sgmrextend before meta page update.
--
With Regards,
Amit Kapila.
view thread (4+ messages) latest in thread
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], [email protected]
Subject: Re: why do hash index builds use smgrextend() for new splitpoint pages
In-Reply-To: <CAA4eK1KN1kozZFu7_A_3oT-ypx-2mP8BcNfKdv7kjv1-6u=6iw@mail.gmail.com>
* 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