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 1vq9Ag-005Rdj-0A for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 12:18:19 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vq9Af-003ov6-0f for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Feb 2026 12:18:18 +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 1vq9Ae-003ouy-2x for pgsql-hackers@lists.postgresql.org; Wed, 11 Feb 2026 12:18:17 +0000 Received: from mail-dl1-x1229.google.com ([2607:f8b0:4864:20::1229]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1vq9Ad-000000007Yu-0nsU for pgsql-hackers@postgresql.org; Wed, 11 Feb 2026 12:18:16 +0000 Received: by mail-dl1-x1229.google.com with SMTP id a92af1059eb24-12713e56abdso560433c88.1 for ; Wed, 11 Feb 2026 04:18:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770812295; cv=none; d=google.com; s=arc-20240605; b=lB7urXuj/Y1K0OWPo6IY8f7mtDdULvxxrIbyKksdrGLvCvcPxkpoRvUaZX3i2fTc9Y TLuUF7VSJc9xPLcKnr74gaYoR65PN9QLDpjFDEcJPjjRMN91diMqfPEgGOhf/9zUj6ky zxKJS/0qsYdrj9gpmKU5rmhXEsc1pzTdVnDmhEInfCmaB4GiXp0Cmx+3z4YK8OJyEyTE VJaXryY4JPcMIoAgVbvi8fzgi49cS1vyUCLHs1m0aSTLkYFNOJq9ffW6nWHL9ojrYr+O ukI9xNXJnCMNwo6jogf2ZfJOvSnH5DJ2eVdMVBeOz1n6RhhQPVvgxg09RKCj3kUFD19Z MnOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=imrkIyalZz0RmdePXDtYmXB3COC83wCynoox2q7ZvZ0=; fh=Hk1ZzCF7YJDnb52b4FYuEvyDmZ6m5nClkToZpmZ0V0s=; b=RYoKHczEU48erlNGmWlOmxlYl2sq+jOQ56pUOqxQPMat5IFps7LqD71+2mYtZA6VTN UGBScIt6HIdhLQdbWhkadMtTVMS8TphMeMb4JdMT2HBD8bN3xD+fdn5heTvF0qmKL5ks 90dmhMVBb0UFXQ0gYfPQFB8dOQeYNvHnzVwB1o7+goxrp9DqreiqjQ2TeIlsk8NHIt9L v7kJAEkQ7SZpyQMNiCX9jKwnG9zzJgusNuyjT20p3FbAhHYGFDM7so4yo0qbtpyyPc+Z eLOcXyzINReF6zB4oUrCa6w7twBMExU1ATWkZgi7gzEVUG0hG5ztEp0uRxfh+o64n5Ah zl8Q==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770812295; x=1771417095; darn=postgresql.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=imrkIyalZz0RmdePXDtYmXB3COC83wCynoox2q7ZvZ0=; b=jgjGwQS4yq+v3LLbuyOUY/dQeowqv98lwdWLQcSTzad/sORxiFxBfu+MRlMGKsyMyn ou4a9WddDN+XzAQXfD+cBgFagOzQXAZcs/o0obqVIHxyEng9Kxy37XvzB9Z2Ew2d9xe/ 2iC2hhKk/L1eEkiAo3qWwopH2S67OW7k35gxodHoLjXR+Sd4jHKufVdx9jvnp5QCITIt igNLym2idoPM5vX7hAgSWHJ+zgnDgBK9LNUb//cjucn8m4VhL3RRWn867CQKwenWkTec DW4eBXQtBw3BWkF9sIT2aL1mbrAgUOZZYT+UTD6We4pNhog3WOU9Uqs3lCVRAZ29uX8Q fSew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770812295; x=1771417095; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=imrkIyalZz0RmdePXDtYmXB3COC83wCynoox2q7ZvZ0=; b=m3hrNO0y5kSHstLUc8hKf7+tjFutq7fqYGL2B7E5zJyMlSX4OLI0Z5koGcRqsAl1nP ZVpNRiI8fkUf+D9xv8ZSEdfKh3kmEs4mzVSmplky3FjWN65qLfvlx+8RzyaKMrWEErt4 La0S85VvBu6TxwW/aLIsyPyR2SCns0PIR9uH4CqRFO1dHlR4PmblwsXtgoAiLdBaklvK 1JGOzNlQobXRsYqt3RjL7lAlPotV90anRF7wE1v9TvdYP4koQTTu92N2FE6Yw8dO3Bq1 pgIvX2Jpcg8WdxioyrBniWialXp2vzZUcBHhEwrJ5+JyZa8NsTgSRLPgsmt8CetbU/st I91A== X-Forwarded-Encrypted: i=1; AJvYcCVQQoO3HnC5nFtY57YjYGPSKoDH+wsIFMlt9EXSpdx5JTsXQUJqK4e9CTMJ8xd2Ws5VgIgGa5qA9wVfblvM@postgresql.org X-Gm-Message-State: AOJu0YyOcoApOdJT120wmm082C7RiXP4Fuc+dolEiLL/k36oL2agIOgC ps4A6Odr0VIU/vL5KOH0nPACEEDmRkUtBZXHq/Ccu2O1GQlOuN+C3lm5aC7x0vQlFTJFZwYswW0 XZAFWgoQYl4Kb+WNDMBQSHDxPw/JrAQk= X-Gm-Gg: AZuq6aIsVb0hWC0iMDbAuPf8GerYbXg6u+PGkBJmDSeUggw1B/sWunOpQktMxanzqyI ufzkaHEKQ8wRl+st7HzQBp0uSXUCI6f7iNpJvPBCWCrQlpo4qy06mMabQUQT3oGLMeztvUg58IS fZxXXsiIDgyzo9zCZpRS9TSfTVIeFSCZ9kbAXfVAPwf6IxU2pzTzT52Ui2FbmIJ6/R2cpwCcgyS p2HOefA750JV1/EBP5nU+Hsu4e2ni98R4FplTBRb5bNdjBagd5eoFD9VfMnzX+4fMPzlId/PHqh mB2OjR0= X-Received: by 2002:a05:7022:6621:b0:11e:4fc:9b33 with SMTP id a92af1059eb24-12723e9ec3bmr2193346c88.1.1770812294761; Wed, 11 Feb 2026 04:18:14 -0800 (PST) MIME-Version: 1.0 References: <449DFC8A-CF54-493E-9366-AF9C73C782AA@yandex-team.ru> <14B4E29D-7B08-4972-BE9E-491A8A6A77CF@yandex-team.ru> In-Reply-To: <14B4E29D-7B08-4972-BE9E-491A8A6A77CF@yandex-team.ru> From: Soumya S Murali Date: Wed, 11 Feb 2026 17:48:39 +0530 X-Gm-Features: AZwV_QhabU1ZrLkKXtOSnrpmmOnbHzkjepbrTDMB627n27rhdN6zBd2whkEHg_Q Message-ID: Subject: Re: Fix gistkillitems & add regression test to microvacuum To: Andrey Borodin Cc: Kirill Reshke , pgsql-hackers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all, Thank you for the updated patch. On Wed, Feb 11, 2026 at 2:52=E2=80=AFPM Andrey Borodin wrote: > > > > > On 23 Jan 2026, at 16:03, Kirill Reshke wrote: > > > > On Tue, 20 Jan 2026 at 15:30, Andrey Borodin wro= te: > >> > >> > >> > >>> On 15 Jan 2026, at 22:59, Kirill Reshke wrot= e: > >>> > >>> PFA v2 which leaves the test in-place. > >>> > >>> Also commit message improvements. > >> > >> Yeah, killtuples for GiST root page is broken. Your patch is fixing it= . > >> I don't think we should backpatch this, the bug is harmless, but for m= aster the patch LGTM. > > > > Thank you > > > >> It would be good to assign so->curBlkno and so->curBlkno together. But= gistScanPage() is the only place with access to the block number. > > > > Sorry, didnt get this take. > > Sorry, I meant so->curBlkno and so->numKilled are semantically correlated= . But it's difficult to assign them together and this does not worth refact= oring. > > > > >> +# Test gist, but with fewer rows - that killitems used to be buggy. > >> > >> Probably, in this comment we can explicitly say that killitems was bug= gy, but now is fixed. > >> > > > > Hmm, what would be a good wording here? > > I've opened an English dictionary and it says "used to" can be used with = a meaning "bug was there but it's not anymore". > > So the patch is RfC IMO. I reproduced the issue locally by filling a GiST root page, deleting all tuples, and triggering a microvacuum by an index-only scan. With the patch, The root page is now handled consistently with other leaf pages. so->curBlkno and so->curPageLSN are properly set during scan, and gistkillitems() operates safely and correctly on the root page. Based on runtime validation and code inspection, the fix LGTM. Thanks, Soumya