Remove duplicate code in brin_memtuple_initialize
authorTomas Vondra <tomas.vondra@postgresql.org>
Wed, 11 Nov 2020 17:37:36 +0000 (18:37 +0100)
committerTomas Vondra <tomas.vondra@postgresql.org>
Wed, 11 Nov 2020 17:37:59 +0000 (18:37 +0100)
Commit 8bf74967dab moved some of the code from brin_new_memtuple to
brin_memtuple_initialize, but this resulted in some of the code being
duplicate. Fix by removing the duplicate lines and backpatch to 10.

Author: Tomas Vondra
Backpatch-through: 10
Discussion: https://postgr.es/m/5eb50c97-9a8e-b691-8c40-1b2a55611c4c%40enterprisedb.com

src/backend/access/brin/brin_tuple.c

index 6774f597a4da037e9026f9eb1a52b2b8458f3ed1..17e50de530982550dc816926b5c39cea2b413742 100644 (file)
@@ -491,9 +491,6 @@ brin_memtuple_initialize(BrinMemTuple *dtuple, BrinDesc *brdesc)
                 sizeof(BrinValues) * brdesc->bd_tupdesc->natts);
    for (i = 0; i < brdesc->bd_tupdesc->natts; i++)
    {
-       dtuple->bt_columns[i].bv_allnulls = true;
-       dtuple->bt_columns[i].bv_hasnulls = false;
-
        dtuple->bt_columns[i].bv_attno = i + 1;
        dtuple->bt_columns[i].bv_allnulls = true;
        dtuple->bt_columns[i].bv_hasnulls = false;