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 1whmuF-000Q41-0M for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 11:27:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1whmuC-00CfvN-3B for pgsql-hackers@arkaria.postgresql.org; Thu, 09 Jul 2026 11:27:01 +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 1whmuC-00CfvE-2H for pgsql-hackers@lists.postgresql.org; Thu, 09 Jul 2026 11:27:01 +0000 Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1whmuA-00000000SeP-36eg for pgsql-hackers@postgresql.org; Thu, 09 Jul 2026 11:27:01 +0000 Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-8eff5ce3b95so12283106d6.3 for ; Thu, 09 Jul 2026 04:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1783596417; cv=none; d=google.com; s=arc-20260327; b=ZT6DmfH6xq5HXoitMvzzhhwC2b8l8l3kWdfsMqzqaWW2mQd8o4Cpa/8yknC9xCIjMi O+m5QAKmXa04sbVU95AaThTrZ2BimAKFscorb80RkiqbL5d0pe97UlogVlH/66mcwmWU 662x5yfICWF5Egu0xp+dOS6HnEYVCa1tst9TL+DbC5AIE7yhzDG2HMkKUB3CL7MK92Jw BS9pRIq78+pkQJ6QIzngftZfZEYb2QHpoe5Kut4f6aE5K7NrLhuuq8TqCK8lxahzLwh9 ClFIdCLrRC56syJkzwWz4UgKgFvV33rVUXjw8+HBaMcptv+MLNnADM4bO6DzUdi8UCwm YflQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=0Mz2WXQuAoJdWivaCKiV/VBgGfJ8IyQy5WYPZ9+KpN8=; fh=+4Mq6vT4KHXOaR63vhVTbfzDkldMc5OePns4bjQ/75A=; b=DujnUa6rv80V1E9+DD95kS/u6p/k8QuONH0yKlH4w0QvVvKAdac9Gqsfg15nJqwBan 8m3AZEVir9ZZQyWGrqCHc3/qXIpHJWpJRbFkH4ZqzMoOZ/AbsbOZU4ZJuCjopwR10KlG 813LIDhbiNVJTq6ihDuyxsYY3zJU0TTgid57OMfpaAtdfw8h883oBFuJXM57vjtUY4w/ f2l2JDFpLC/Hz1cJiFtyhpKS37dkCjcViQKhg/qqNJBtYfX+OwoFoWgE9p495nBlZzr1 3tflEwGohrV58TgZv29qp9k+HKZlBLmGpUyVBoDi2JNmWhiMMoGUDI69FIAuHeFl2F0m yAzA==; 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=20251104; t=1783596417; x=1784201217; darn=postgresql.org; h=content-transfer-encoding:content-type:cc:to:subject:message-id :date:from:in-reply-to:references:mime-version:from:to:cc:subject :date:message-id:reply-to:content-type; bh=0Mz2WXQuAoJdWivaCKiV/VBgGfJ8IyQy5WYPZ9+KpN8=; b=Zp25pDOZxYboZAKkHkART2Erm6WBYU1wjKuGJPEfusGHlp+39vbEBenT99kzgyhmoN YignuibjnzuQbISWVvwGzVafu/R7rkdGbyVFoZqYebBXLHEe4EhGiRFmqAuvpMtV8uwf ux3y0kqO47e6uRGNSvbD8iv+GD9b6yqlH2ZxMAZBqjQni7gkd5oLlfT+u+6rWx2OIitx MYzKG9xPRRoQkoCwbem46NOLntETbgjz9EP/kjCuBfK3fvwFsAssJYsXwPe7R2v00+nX eGCgZX14kGWBFYURlOr6Pybp6X1mkSx/zOZU4fC0zT2gs+6qQMRCULga5Cp1M/NAmSRn ocuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783596417; x=1784201217; h=content-transfer-encoding:content-type: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 :content-type; bh=0Mz2WXQuAoJdWivaCKiV/VBgGfJ8IyQy5WYPZ9+KpN8=; b=IMpDUCYziQrIP1vX+IZZuzfLeAJZuDkQqBGKIIV5YWVTIDvQJF/ULLpVoqKRqZCnBL m7v+KH0FC1jOpqk2U0iSySa3OgGnSMQ4GNL2nYMijednOGHWyVsxiuIjjp7PhmVoKkKd ptQIb/FTtr1zy8XENozsWj3wHEcBflQlV45b0Wk/kgoq8Hdz3O7c4P/cS8sKT7qV8Isr HntfCR4og0C213HdNFz0Dnp5JEanrkcO2RxTuowQQs6S2nB3HjTBXqhRuBa7WcSQMUeB FTNj71wbA7eBq3bg/qmKMGyyGZmlF3yCaoC9FeCl7RP9E5UdhXMmZcGx3GPysLa6R6ZA 5IFw== X-Gm-Message-State: AOJu0YwWoCX1kXoxuAIHO4dRzueX1AeUoERgj7QF1lwWwGqC9juXZgBb nTFceYsQ4uX/flVgRUaDSJaAjjHJQDL0y0rpTyr/tRDkTNlJnAAp7y7tvZjY3wKuIiVRBdVUfwM Dpl7N9kSI+lVYjHB8+MDCl7SLLLXJDfU= X-Gm-Gg: AfdE7clDRd6otQ3TJoaWoHJKBTr+VrRQDIm3NXhgnAl01uMt9kjCCuiKUUpzXYbWjE1 qvt8nkQEGX0ux4noFiUV9RGHHepJcXFtqvQJv857TmY0em8bED5Ps+lrwoco94PyYs/1cJXN/rE 9ZDZO0pLN5xfhes9ifxmP/YamfVFWmLFCTsymtF1uyvfWFXUiYj3t6ISO1OFY2YXqHACI+RYXHz P4PpUF0vuklH2lllSddHiI18hNXltkJ5lIFWM1gCqPL00U/DDOclQ0lTdACzqcBKqaNR+RTPk0d 6XwhonrEmzpd1tN02Mquu9cWWAl7gn98F2NX6IA2jwHQC2eTKqg1l1l09VGwjl9J6DxdNw== X-Received: by 2002:ad4:5aea:0:b0:8ec:a010:9af5 with SMTP id 6a1803df08f44-8fec03f0604mr70995396d6.10.1783596417183; Thu, 09 Jul 2026 04:26:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Alexander Korotkov Date: Thu, 9 Jul 2026 14:26:44 +0300 X-Gm-Features: AUfX_mzHvvLVZ-rjSQYaJjhgq9se-gPy3DmDFvLWRFd9J976PwwdnXPdtz2tfjI Message-ID: Subject: Re: Tepid: selective index updates for heap relations To: Greg Burd Cc: 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, Greg! Thank you for your work. It looks huge. On Tue, Jun 30, 2026 at 8:21=E2=80=AFPM Greg Burd wrote: > Write path. heap_update gains a third mode (HEAP_SELECTIVE_INDEX_UPDATE) > alongside HEAP_UPDATE_ALL_INDEXES and HEAP_HEAP_ONLY_UPDATE. It keeps th= e > new tuple heap-only with its inline bitmap, and the executor inserts fres= h > entries only into the indexes whose attributes changed (ExecSetIndexUncha= nged); > the fresh entry points at the new heap-only tuple, not at the chain root. > If the page can't fit the new tuple, the update is downgraded to a normal > non-HOT update. I didn't yet read the whole design nor the whole patches. But this is the point that raises questions for me. How could this work with the present Bitmap Scans? I didn't find the direct answer in this thread. As you describe, entries to the indexes whose attributes changed are pointing to the new heap-only tuple (that effectively makes the tuple not heap-only, but that's just terminology question). For instance, you have old tuple T1, "new heap-only tuple" T2, unchanged index I1, and changed index I2. Both T1 and T2 have values V11 for I1. T1 and T2 have values V21 and V22 for I2 correspondingly. So, in this example according the paragraph above the logical contents of I1 is: V11 =3D> T1, logical contents of I2 is V21 =3D> T1, V22 =3D> T2. Imagine, user searches for the tuple containing V11 for I1 and V22 for I2 with BitmapAnd. I1 side of BitmapAnd will return ctid of T1, while I2 side of BitmapAnd will return ctid of T2. That gives nothing in the intersection, while T2 is obviously matches the criteria. As you mention downthread, Bitmap Scan can tolerate false positives, but it can't tolerate false negatives. Bitmap Scan assumes CTIDs to be independently indexed pointers, and therefore corresponding bitmaps could be freely overlapped. I think Bitmap Scans was one of the critical weakness in WARM, and it is the question to be address in any further attempt in this direction. ------ Regards, Alexander Korotkov Supabase