Subject: brin: Remove duplicate initialization in initialize_brin_buildstate()

From: Chao Li <[email-masked]>
Date: Wed, 21 Jan 2026 14:29:54 +0800

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.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/

---

From: Shinya Kato <[email-masked]>
Date: Wed, 11 Feb 2026 10:23:01 +0900

> 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

---

From: Chao Li <[email-masked]>
Date: Wed, 11 Feb 2026 10:32:32 +0800

> On Feb 11, 2026, at 09:23, Shinya Kato <[email-masked]> wrote:
> 

Thanks a lot.

Best regards,

---

From: Fujii Masao <[email-masked]>
Date: Tue, 10 Mar 2026 00:10:22 +0900

> > Thank you for the patch! It looks good to me, so I’ve marked the entry

LGTM. Barring any objections, I will commit the patch.

Regards,

-- 
Fujii Masao

---

From: Fujii Masao <[email-masked]>
Date: Tue, 10 Mar 2026 22:57:18 +0900

> LGTM. Barring any objections, I will commit the patch.

I've pushed the patch. Thanks!

Regards,

-- 
Fujii Masao