Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vq02X-002XKC-1G for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 02:33:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vq02W-001tAp-25 for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 02:33:17 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vq02W-001tAh-0a for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 02:33:16 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vq02T-000000003cN-1Wox for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 02:33:16 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-81df6a302b1so5235064b3a.2 for ; Tue, 10 Feb 2026 18:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770777193; x=1771381993; darn=lists.postgresql.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=V30sPj7jMcj9HzT17RVDh/iLwPHGgJmp/VldE63CHqY=; b=jnOIpks02+qU2n68X2l/ie8BiFahQViqg4H9w+MVgrFWGbgSQu06XRpX4bsxqEPlQL Uf9oqldW4/L3C6Srs4ek38vWcK/Qoj86SY2l9iyP6zrU2V4RCgUmsU0rd/3b4mviFl45 Ngcd03jZ9HISIic39RzSnAYakP1jlPQhOaA2CdrKfHTmNnyIJemnK1OcfM0hqjZ4LIii VO2qM7wEngAs5TIMooWkPaP2P5wYel+DLXtkpAVYwzwCJRJAZR5NTdXgaMdVKakCYsvN JXOa/DEi9hAshAtBl5ez449MuKksdlbQD+U+5eRwaq9AQmYEx2a70Hyg3veKRVZzaz+i TAAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770777193; x=1771381993; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=V30sPj7jMcj9HzT17RVDh/iLwPHGgJmp/VldE63CHqY=; b=RoF0nRmRYjvEFXNtHLUJBiiTT7xII74NczJpveQ3ibhmLd1YE3V7jXBbChwmo9wmc9 rPaJIBqbugaN+mNUj1y3N1Nw8pP5rD6dqXwhtbUenmi1vVR0imSOhnfmux4CVRSyz5w4 4ivmmD+pOO6jnInh9Ci7HYHlrCasOuammbLwzYzCf4rRH34Ww7kC02xVCfC/5cNmqhTm FqCsBBjxdP60LcedCSJYxVCaXqMYLNNIs70Pd/0cZCfB2zFIskiO9z5bAnzH1EN9wqAH SK291VMVSSxAYLRPUmc3Kq2a+vrJwRZaFvaiKVKpiVBWqRF8wNi+60y0MoTMbCoBFg1d BTKQ== X-Gm-Message-State: AOJu0Yy4p5uVbzPh2xf3fZqoo/17WrK+B41ZlYnyjmUYIEYd6uNPcMbC /r7J3aDLKqDiQy8eaJLhXpZ1sg1q9DZECgU7zoqGiGses37RXfo9rfkFsnfdPQNT X-Gm-Gg: AZuq6aJNNqt1uIlER3nx1CwnhcJB2/ORqJsJ6aiccnqzY9pUHKJ7NLjx2FaPd6wET8U tukB0Ge6W6+u/5mnLycA74Xn4eWd3Z/R0mh1hZMd/dlxCVmtqyUo7+xBZN4P1v3GBr9eRuuzwNn hl1diadl1QblhGpZyD6jJ52+VcGr2+6/u63N6fnYhf4L9WvjpvpmhYkMo56iccPrP+m6K4udueZ +cPS84AAsHBpmcR27akcOF06iy/8kOo5sbvdLSwrHQc/mWf9J0xpq2a1B2gGE1+Q+0/AtGMrA6U NClfSJjr4IzuxJ7izDTpgTnUJ3cHVDsmYA8dLkz765YmWzKqeZdZhGq7QUDnaQsB9lAFYPiz27l fEqt0Jt8IPl13AM3qyiSXHQjqkjotf1O5UwExTwzXmIuNQO0viFMpyxKJe+mBfA2MFlX4ZdtL/w Rb25wWGyApXRbP8eqOfuh1RClNscZrb6Q= X-Received: by 2002:a05:6a00:1a19:b0:823:1252:9428 with SMTP id d2e1a72fcca58-8249ae2c320mr855457b3a.9.1770777193136; Tue, 10 Feb 2026 18:33:13 -0800 (PST) Received: from smtpclient.apple ([45.32.121.103]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-8249e367be5sm371108b3a.9.2026.02.10.18.33.10 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Feb 2026 18:33:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.300.41.1.7\)) Subject: Re: brin: Remove duplicate initialization in initialize_brin_buildstate() From: Chao Li In-Reply-To: Date: Wed, 11 Feb 2026 10:32:32 +0800 Cc: Postgres hackers Content-Transfer-Encoding: quoted-printable Message-Id: <889A68D5-15E9-4B98-BDED-91DAAB80477A@gmail.com> References: To: Shinya Kato X-Mailer: Apple Mail (2.3864.300.41.1.7) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Feb 11, 2026, at 09:23, Shinya Kato = wrote: >=20 > On Wed, Jan 21, 2026 at 3:30=E2=80=AFPM Chao Li = wrote: >>=20 >> Hi Hacker, >>=20 >> Just noticed a redundant assignment in initialize_brin_buildstate(): >>=20 >> ``` >> static BrinBuildState * >> initialize_brin_buildstate(Relation idxRel, BrinRevmap *revmap, >> BlockNumber pagesPerRange, BlockNumber tablePages) >> { >> BrinBuildState *state; >> BlockNumber lastRange =3D 0; >>=20 >> state =3D palloc_object(BrinBuildState); >>=20 >> <=E2=80=A6omit some lines=E2=80=A6> >>=20 >> // Later, b437571 added the same again. This patch deletes these 3 = lines. >> state->bs_context =3D CurrentMemoryContext; >> state->bs_emptyTuple =3D NULL; >> state->bs_emptyTupleLen =3D 0; >>=20 >> // Added by dae761a first >> /* Remember the memory context to use for an empty tuple, if needed. = */ >> state->bs_context =3D CurrentMemoryContext; >> state->bs_emptyTuple =3D NULL; >> state->bs_emptyTupleLen =3D 0; >> ``` >>=20 >> So, filing a trivial patch to eliminate the redundancy. >=20 > Thank you for the patch! It looks good to me, so I=E2=80=99ve marked = the entry > as Ready for Committer. >=20 > --=20 > Best regards, > Shinya Kato > NTT OSS Center Thanks a lot. Best regards, -- Chao Li (Evan) HighGo Software Co., Ltd. https://www.highgo.com/