public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Subject: Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
Date: Wed, 14 Jun 2023 10:01:59 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEudQAoqYj0k6XQTMWhQ+GbYpXhmV12vGsYTW+cUvzir79xOcg@mail.gmail.com>
References: <CAEudQArzX-q7FuvHxcEQKP9RuM7eFw4CnvU_xQtkiu4+tnaA4A@mail.gmail.com>
<CABwTF4W+WMr=3bjLP5-69+oG81BEZOH+SAqPX8GDnZry5==thA@mail.gmail.com>
<CAEudQAoqYj0k6XQTMWhQ+GbYpXhmV12vGsYTW+cUvzir79xOcg@mail.gmail.com>
At Tue, 13 Jun 2023 08:21:20 -0300, Ranier Vilela <[email protected]> wrote in
> Em ter., 13 de jun. de 2023 às 02:51, Gurjeet Singh <[email protected]>
> escreveu:
>
> > Please see attached v2 of the patch; it includes both occurrences of
> > the spurious checks identified in this thread.
> >
> +1
> LGTM.
> LockRelationForExtension(eb.rel, ExclusiveLock);
>
> - /* could have been closed while waiting for lock */
> - if (eb.rel)
> - eb.smgr = RelationGetSmgr(eb.rel);
> + eb.smgr = RelationGetSmgr(eb.rel);
(It seems to me) The removed comment does refer to smgr, so we could
consider keeping it. There are places instances where the function
calls are accompanied by similar comments and others where they
aren't. However, personally, I inclined towards its removal. That's
because our policy is to call RelationGetSmgr() each time before using
smgr, and this is well documented in the function's comment.
If we decide to remove it, the preceding blank line seems to be a
separator from the previous function call. So, we might want to
consider removing that blank line, too.
Otherwise it LGTM.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (11+ 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], [email protected]
Subject: Re: Avoid unncessary always true test (src/backend/storage/buffer/bufmgr.c)
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