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 1w7OfQ-005H4P-2K for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 02:17:21 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w7OfN-007aVC-1L for pgsql-hackers@arkaria.postgresql.org; Tue, 31 Mar 2026 02:17: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 1w7OfN-007aUT-0D for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 02:17:17 +0000 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w7OfL-00000001tt4-23uH for pgsql-hackers@lists.postgresql.org; Tue, 31 Mar 2026 02:17:16 +0000 Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-48702d51cd0so61458075e9.2 for ; Mon, 30 Mar 2026 19:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774923432; cv=none; d=google.com; s=arc-20240605; b=a/VCuxXXS5Xle7grRhYahOaqdBPb+Mb5KQtUt1uDGT7QnzUnm4G1CNWrcApQb/6/lt ZJDLhAYC2RWe0t7EgYlmg3kJwhMuKbNJlQhGruwTGIlH13AlWhcqO9o9ad4hbBGxdA8W IkuoRAone3ksFr+7Nnvzm5VT8uxV+t0UmxUxGpGYiSHN3WBuzQGNtLJOSH8Zmw50FgLw Ha7n20oZXtVBtAqkXD7OWoghHKpRN1Gor784bZf46IDpT6BxsxVOFvBnxH7KotJPymUb QEQWN2Hzt5q/zFbWKjzqYnhOWqvelbeMxH2je4vhsTcX1J28iJTi0HtPC+aYm3Es9UGu kDuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=lkJkYZd2a5chw6y8hWpRO6DJ5PYUILgT+hJ6+0S8od8=; fh=EY0qbGN3nrBU58jmkroBfbJi6BX2DBnZoq8S9tIwXz0=; b=R5i1uej55z9A6EEIqGnw2cTElVLqlxzHz2JUR/7zIzJ0k9q0+Wv5t2nA/9d0VFxI2w l5p3fY3B0Ghe1X8MYjfeZlKUSIRvxpU3qTtJJi4M+XwbcKgzSXUU20N9Ggl+zxhKBHib h8fPbA6FPu1a2z/GiOS/BAUBzK9mBCCFgBITJ3H5fn+Je0yKIbrlGBAV5BMFOmnBymTn a6FPCyu+q29X05fAv0+FWWwdq+blZdtSTJd2u987F37q3lwhkx6kRAxfYXBcmxCkzl/u 1mxM0T4OQvMp+u5mEBkHSm8zyBlyCLmiQzX1gG+avnAu4x+9nCfs52uqweB1LyEjGcW2 YlvA==; darn=lists.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=1774923432; x=1775528232; darn=lists.postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lkJkYZd2a5chw6y8hWpRO6DJ5PYUILgT+hJ6+0S8od8=; b=pQntxzCq4xYv0TPHvY9UjvSDyIwJjyIehsb4Go3gyMa35T9kCN+bBuhuGFBSzT2bXM biEtEYQQAznhHsFmMpUbrI62+aFI1qGBdWe4WykpXLMQScrkY+2ijvBj9XFAeNmw5A5n +kplu7KWFIqfUi+XezXQ2Zp6AbqpemFXdhbzL/YYUXpzuBvoTzUoSJJNFQF7SdoUFDoe QlWCc2f5U8chczHjYaywiMk7iKKBWXBI/VixjLzA07JUhHK8enBhtgCW9KIUvbAGorCT j4yozcCjjF6Ztz/RCDJ99bhDbRTA+S7DKuFPNwqgR0Q70f6lu+P3Q2QtJX73jLNcF1CH IMOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774923432; x=1775528232; h=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=lkJkYZd2a5chw6y8hWpRO6DJ5PYUILgT+hJ6+0S8od8=; b=fjjAyisAKTIpRAno7rTUCyfOY/KDsV7tynjm8AkjtKEwVUDwWLRLnFJ8LxSnRmz3Yb O88ZD8N2YtTWgdaiNSJeSSPoPBMt5JhnmpS1wZs4b+M2u2Op7bxEHcwi0ZEGyWoCi4Yg XH/lp+bnVv0lGvZ4iY0SB6J+2I/MtCAmCCSkxiAOxRRoOLTnPpviqq8JDSbFyVeKWHKM 5/r8PrfqsOUviN65l1rmCfhK0NzJPItfLCjlBg9jI4r2n7j1Er5FL9P0022Q6Gf8d20h 4KNSwpLyAXn7Qwi+qRw46TdUZaHxDtCTBIu7ZPyWCZKIMSzipYV2Ao8OXJnkkE5PHAnB MTFQ== X-Forwarded-Encrypted: i=1; AJvYcCWIAEM4EEqjE4rwEKiHstzHsHESgPEZCnrCVLTXg7wGeu0ij0bkvy3+wtgYMv/3kZ/AD6cW7qApZqHapUNm@lists.postgresql.org X-Gm-Message-State: AOJu0YypfdgjXMXO8NttI1/CMFxHqpOYKIMfZvC1XA9m3W/PGKLqNuLT DJe7av7UJkPwa7FQ3e+XfV/sHnh02NGyAskVTqsBgnis8NLSof8Jdat33vvk2hIsCiyU5OiDbpY rsp31kXbMYnLDvGYX4PkVMOmr9EvfBNE= X-Gm-Gg: ATEYQzzn4Gi2kQo8oJM4vkd/lYZ42HS89EiPLL4HYwG7lyzht4j9zWEtkHDa4DWUZyX tOspM3hPBquuVst7QyFa0zkGU4/izUFw7So+RiVXrO+0HVEeXV3l1WRDkjK8r9Zt2N4PuBbtL4F jkIq9CayXwjQlrMnTCN3NPQx/LkJMRDMoQzVlHLGhMIDlhg9Oj2rGNgRbOUEQ5kAuCLasOH5Bdy d8f2FhCqvJznan78911R6oramN6mhdFQ+Me0ikaaYjptdQTfHrOgEz/frDb14+Xn8NTH0eVkIUq JQGtoh88IVriQqqQv/n0BrMwTwPvKpDNFj3cjceU0OeWPM520D74DNnfmZEjPKdVa6VwLF13vrX NseCzCKlO X-Received: by 2002:a05:600c:a00b:b0:485:34b3:8587 with SMTP id 5b1f17b1804b1-48727d8ffc5mr255929405e9.10.1774923432248; Mon, 30 Mar 2026 19:17:12 -0700 (PDT) MIME-Version: 1.0 References: <2be31f17-5405-4de9-8d73-90ebc322f7d8@vondra.me> In-Reply-To: From: David Rowley Date: Tue, 31 Mar 2026 15:16:59 +1300 X-Gm-Features: AQROBzAV711utAmw14-MR0gSn4POWQHSYhOXBQjNO350MChDqH-eYwEJSdkp-VE Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Melanie Plageman Cc: Tomas Vondra , Andres Freund , Kirill Reshke , Chao Li , Andrey Borodin , Xuneng Zhou , Robert Haas , PostgreSQL Hackers , Heikki Linnakangas Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, 30 Mar 2026 at 06:16, Melanie Plageman wrote: > Attached v48 does a bit more cleanup. No functional changes. I'm > planning to push this soon. I think my remaining question is whether I > should move the row marks and result relation bitmaps into the estate. > I'm leaning toward not doing that and leaving them in the PlannedStmt. > Anyway, If I want to replace the list of result relation RTIs in the > PlannedStmt, I have to leave the bitmapset version there. I looked at v48-0001 and it looks fine to me. I've only minor quibbles about you using foreach() instead of foreach_int() and foreach_node() for populating the new Bitmapsets in standard_planner(). I don't see any advantage to adding the fields to EState. There might be if there was some performance reason, but it looks like you're only accessing the fields when scans are initialised. It's hard to imagine an extra pointer deference would matter there. I didn't find any guidance in any comments to understand if there's a best practise here, so I assume what's there today is down to people's taste. For me, I'd say if it's not performance critical and the executor does not modify the field for any purpose, then keeping it in PlannedStmt is fine. If someone thinks I'm wrong on that, then a comment at the top of EState would be helpful. David