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 1vgI4K-00ATLX-3A for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 07:47:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vgI4K-00FMIm-0K for pgsql-hackers@arkaria.postgresql.org; Thu, 15 Jan 2026 07:47:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vgI4J-00FMIe-2Z for pgsql-hackers@lists.postgresql.org; Thu, 15 Jan 2026 07:47:00 +0000 Received: from mail-qv1-xf35.google.com ([2607:f8b0:4864:20::f35]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vgI4I-000ZvF-0P for pgsql-hackers@postgresql.org; Thu, 15 Jan 2026 07:46:59 +0000 Received: by mail-qv1-xf35.google.com with SMTP id 6a1803df08f44-8887ac841e2so4947176d6.2 for ; Wed, 14 Jan 2026 23:46:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768463216; x=1769068016; darn=postgresql.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=I+mEbDx738pRugUK+JZ7i+I9pGU/Nm8Wj0TokYQqFJQ=; b=AA6Jqr6SIrBeilWPOMEb1AfjlV5k2/lh7r/7ge8ui9/h6h2CS06aKjSJ3nmcwoNrW/ u2IHcXlkZXinvGENWUZNQNdED1kk4f8pXc1W2gjXKjc7C+5DLfBJHezhRR6FJioNFM6H dGylZo9j7qWkRWriTm0AF7T1YRC+ApObFk8k7r11zAYywJZNd6bsoWLgc5ldkMjTy+Of NegMtyI6YmLaU27TbQ+UWiQIhQlCsL+hM3Uhmxqm1fIJw+nAktHe6zPVp7W1QOAOpC1+ M1zMNGd6fMVdI5E/zVigOICoppzhQE1+nEtt/+54Qf/ccblt6uV7R/gov/xBLarqZ40D Xylw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768463216; x=1769068016; h=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=I+mEbDx738pRugUK+JZ7i+I9pGU/Nm8Wj0TokYQqFJQ=; b=X8CECHibxlAxAM7JIbKSmzkpTwOFCpHcZC0GInoz48aBPt71cTR1JXZ/OmmTk7ieyl bx/lfw9Ct59lr7rtZ7ybeGsdujoZcJC0SXDaFsfHQ4VMN8EIHvBDlz9pYhmkhSVqHO5j F3EbKVvXthOnT72Mcy6Dz3m/MMOSrV1QiXi8hjhV5Hei58vzj2fy04+5roaKGXWlmNOv bJzmV7yc5ClEb0K9teRw/SMQl8tQT1Q629zsuP73XmGDcSUZoKcVqEoQRmrHZ3t8boY2 G2/8icKfpTkCF5wngFkbC54tDCuXzScnOqmn+H9Fj1VZW4OToHPpazh/nGt0njiUKm6q 4GNQ== X-Gm-Message-State: AOJu0YzqoTb50iRfsxIM2Iir3st9fV06Fo2DCPj8kf3bCJ/F7VAE03dK W7SVmpo256OMc107Rr/aKoZqYhX73N1EaKAoHJh279/pkJs15UtAeMtvdqIbjU2RWyu53BW5pp2 fp5gRyMyw1AW0dcIax0L2xFejuEIZM69km99L X-Gm-Gg: AY/fxX5W4GGX0UeJzLpIuSJrtHbkjyf+6tZVoYNNWRNTGNZVm2Iio4eYqgRxX4RAHXI V0Wzn9v+DN44e3k9VwVCiNjCH74x/rIRVS53cqODpIMWHLy1w4slcV8Rvaj+tb/TaDm05wxF5QC SbYmX0RZo0UqhCrbNjVSqym77+Ze4D+/8Lc+JolVGxl1wY2tOn5Z1zJecfzM8N01pgQVKXNY8tf VVKO2FkrOw9YpYGHkBkbuB1h+Usq0O+onDw9L1/RYGVDeMFk7/fxnWhPuRb3W6F4wj2rBpEE4u6 tEXU8N75vth8wR/gi+gsq7oUNySzYs5Yyc000/BgoGoRlHTCnynylj3dZnwmFZk4s2ufiLCtXnY LKehM X-Received: by 2002:a05:6214:2a81:b0:88a:34ed:5c6e with SMTP id 6a1803df08f44-89275c88ac4mr59637256d6.71.1768463216327; Wed, 14 Jan 2026 23:46:56 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Kirill Reshke Date: Thu, 15 Jan 2026 12:46:44 +0500 X-Gm-Features: AZwV_Qg8yGU0JBbP4jJRQap8zDuqIfny68tLV02MKbXOSjN_EQDp5ItQ1IBS3qc Message-ID: Subject: Re: Fix gistkillitems & add regression test to microvacuum To: pgsql-hackers Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Thu, 15 Jan 2026 at 12:00, Kirill Reshke wrote: > > Hi hackers. > > While looking at [0] I noticed that XLOG_GIST_DELETE & XLOG_GIST_PAGE_DELETE > records are not covered. > > This thread addresses XLOG_GIST_DELETE, which is also known as a > microvacuum feature. > > test.sql contains regression test that trigger this code to be > exercised in stream_regress.pl TAP test. > > Test is as follows: we create a gist index on the table, then we > insert exactly 407 records, making the root page full (next insert > will trigger page split). Then I delete all tuples from relation and > trigger Index Only scan to do kill-on-select (killtuples). It marks > gist 0 page (which is root and is leaf) as has_garbage. Then, the next > insertion triggers xlog_gist_delete record. > > To verify this I use pageinspect and pg_waldimp (locally). Also this > test is dependent on block size being 8192 which is not good. > > > And all of this does not work actually without v1-0001, because there > is a bug in GiST which does not call gistkillitmes for the very first > (root) page. > > There is also test2.sql which inserts a single tuple, not 407. It can > be used to verify v1-0001. > > [0] coverage.postgresql.org/src/backend/access/gist/gistxlog.c.gcov.html > > > -- > Best regards, > Kirill Reshke