brin: Remove duplicate initialization in initialize_brin_buildstate() - Mailing list pgsql-hackers

From Chao Li
Subject brin: Remove duplicate initialization in initialize_brin_buildstate()
Date
Msg-id CAEoWx2nmrca6-9SNChDvRYD6+r==fs9qg5J93kahS7vpoq8QVg@mail.gmail.com
Whole thread Raw
List pgsql-hackers
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/




Attachment

pgsql-hackers by date:

Previous
From: VASUKI M
Date:
Subject: Re: Optional skipping of unchanged relations during ANALYZE?
Next
From: shveta malik
Date:
Subject: Re: Skipping schema changes in publication