public inbox for [email protected]
help / color / mirror / Atom feedFrom: Chao Li <[email protected]>
To: Shinya Kato <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: brin: Remove duplicate initialization in initialize_brin_buildstate()
Date: Wed, 11 Feb 2026 10:32:32 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAOzEurT07FUyHnxpY=CXia2z3eto1APA4RpE=zhb7=-tmhHGPg@mail.gmail.com>
References: <CAEoWx2nmrca6-9SNChDvRYD6+r==fs9qg5J93kahS7vpoq8QVg@mail.gmail.com>
<CAOzEurT07FUyHnxpY=CXia2z3eto1APA4RpE=zhb7=-tmhHGPg@mail.gmail.com>
> On Feb 11, 2026, at 09:23, Shinya Kato <[email protected]> wrote:
>
> On Wed, Jan 21, 2026 at 3:30 PM Chao Li <[email protected]> wrote:
>>
>> Hi Hacker,
>>
>> Just noticed a redundant assignment in initialize_brin_buildstate():
>>
>> ```
>> static BrinBuildState *
>> initialize_brin_buildstate(Relation idxRel, BrinRevmap *revmap,
>> BlockNumber pagesPerRange, BlockNumber tablePages)
>> {
>> BrinBuildState *state;
>> BlockNumber lastRange = 0;
>>
>> state = palloc_object(BrinBuildState);
>>
>> <…omit some lines…>
>>
>> // Later, b437571 added the same again. This patch deletes these 3 lines.
>> state->bs_context = CurrentMemoryContext;
>> state->bs_emptyTuple = NULL;
>> state->bs_emptyTupleLen = 0;
>>
>> // Added by dae761a first
>> /* Remember the memory context to use for an empty tuple, if needed. */
>> state->bs_context = CurrentMemoryContext;
>> state->bs_emptyTuple = NULL;
>> state->bs_emptyTupleLen = 0;
>> ```
>>
>> So, filing a trivial patch to eliminate the redundancy.
>
> Thank you for the patch! It looks good to me, so I’ve marked the entry
> as Ready for Committer.
>
> --
> Best regards,
> Shinya Kato
> NTT OSS Center
Thanks a lot.
Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/
view thread (6+ 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: brin: Remove duplicate initialization in initialize_brin_buildstate()
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