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 1w6Ctt-0043gG-2X for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 19:31: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 1w6Ctr-00BmWN-0v for pgsql-hackers@arkaria.postgresql.org; Fri, 27 Mar 2026 19:31:19 +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 1w6Ctq-00BmWD-36 for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 19:31:19 +0000 Received: from mail-ed1-x52c.google.com ([2a00:1450:4864:20::52c]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w6Cto-00000001XMA-2SwK for pgsql-hackers@lists.postgresql.org; Fri, 27 Mar 2026 19:31:18 +0000 Received: by mail-ed1-x52c.google.com with SMTP id 4fb4d7f45d1cf-6618bc129acso3688047a12.2 for ; Fri, 27 Mar 2026 12:31:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774639876; cv=none; d=google.com; s=arc-20240605; b=HdSCZuzo30h0WGsSlaEFX1QeGdk9I5elDnM6d/olYSI6t5vVMJSMRUxsg0W3brsm9B 6I+idbRvnVphranEwYfwRS0I5h33QRQEw0zBA1a7Goa1m2CfTDowX/aDuaJTozq4PNf/ 23W7PMR9kltAPcqJ0cjG/q+MrMHAA24ELFLxYMHHe7Yq0/rapjvFlWYBl3k56egVVnfh EuOnq1ay3/NGUMqjBie6YiE6IB84//Vhhs92EFpG+aOWSVNPFQ2i2ZLPxfrgXCXOn3TY WJcmb8ngQ2aPq64/FK9Wx8aobM9vybXhaUINrilIrr5YzrrsXAASDGPfAbwwAH4sbaKd FpPw== 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=wLV4kg4ktVC3Lks1KwMRDzb0Y88EyCvrfPvFhKvb0Qw=; fh=nK04wzXw9b/3USxF9hDirKxKBqfyKLqaROhq4eN9IXo=; b=LLQkjp0Yr0n29la+0JEPkj7e1S7zuAGrSceUZ3SxL+DD7acTlne/gH4YeNVr16t9F5 8RXJNu2VyiIb+t8k0R2QLZLKr9b01DUnwSRI1xUsErW8CMOIxKo6bCJOhyZ6UUnMv6PJ Wpq2UPsraSRNwwAto5tGPORwBoTJTLJNgVKSv+ERIR0ArOhvrGkot9MH5X71pHkYj3CN yPl9EoKZqfnmbmr7u2Ti1owalDVTddixHk/Q9F2T16r7C5OGnaX6xOd0b2fUBQeA3sCZ ibHlHNtoRoaKAkeOZe8vpMgMmgVhyvGbCM16yYD3pQ7ZJxRvSy6Ir6AZmFVRnl8ogPcJ ezhA==; 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=1774639876; x=1775244676; darn=lists.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=wLV4kg4ktVC3Lks1KwMRDzb0Y88EyCvrfPvFhKvb0Qw=; b=JOAx2PJlmh+mqjNPsNvxGw9YUwnF3cucoExdI9nwf6eFJKrEHf2n+ZjJAMaey1RwJt kpkEuXLcNt0P7cVJHkt1PT2ECWCpndnyhnAZMuAFDl+EY9BJ0HcCCq1okkSYrc1uCijn GMlixXWYNtjKp/gauK5sHxlfMzPnz1o59cwsj5bPU8jXyqEm7xUytHwLB1T+l3T3z4UX O74PRQUfOSivCygx8DYDQdqfDDVTj4nel1qzVaZfWQqIPGE1khwS1StXbzxvJ5a7GbJx IXCXr9LN9BXCLl7EJYxrXSVOBNAkjC4/FJp3t+7WIiKjASKYGHPXlEukGDuLRx4Iu16z kAdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774639876; x=1775244676; 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=wLV4kg4ktVC3Lks1KwMRDzb0Y88EyCvrfPvFhKvb0Qw=; b=YnUWD3jAK3hhV+BrgkWvAQc6F40hCgCXkp6nDdmCMmorWdnk4KdDTLAdVW4xcTFeEh dYgETDFozEObi1DsLdDynANbA6YNNsgd01Uq7HajnE6E7Ue3u2AzUjgaC8l5AiNjfve6 bIRrRJ80n1oEIfJK3m30QLDvotfg6WBIwuk+2NMJQNlrQQvxXhzgjgNiiIRC88iZEdxb wMv28GxMADSyDmnB6UCTtlk1/E6e2Rn2na330uHs3TCA81oxPQXgyExXT3hKkpy+oj3L u/CrU/UB9L7I0DZfYkOAPgD6hPHEIBgqJqfusXK/rK9+euBx8JWRKo4TJipr6dZfREfo 08Gw== X-Forwarded-Encrypted: i=1; AJvYcCWErQaWfLFymWuREryPnNvnT4nIy7pgWT9q7HZzTqXr+neKUwcyfn7nlu6cpPP3D8H1RKu4q+LrqTOq4uBb@lists.postgresql.org X-Gm-Message-State: AOJu0YwOd2hoq6HqoZUndaPRrTzzXDibyloB83TdOk44nVQlR98LJsIF CuMGTHRJyYIbLtsE8dT6zdWtX8y9gCp3olEcQ3bw4Lb7KWWiq9vAxErkmhiPaiGczdQCQjvBwXw +sDQWuWBEruFxxjZ1nGF/+nC/tPBdb0A= X-Gm-Gg: ATEYQzwj07JENimLBzZheYYBM1KWCdcj5kq1U7oBHU8wiOQO2Ht+/H3QUA2mAplojY2 Y6uBjrxYZ2PgAiLpRJ4ulRlBojWQT6e48cEMAdV5oxvv9taC5L3Za04+YzbAtPkA9dh9sxROAHr mjW4P0DlTKlTTWqoA0HaSwhubzN4BXvdfpnlhKx9LxpEa0mJzmBxKYlXvqweovyDQi8Yrvh/WoV lL+4h2Xhgh4mKUiYgx+lEwJ7QnSO2Ju5bymwE5ALc2hGbIF82xFGRw4WfIuXdmn5VQvyrqGL7Ea e03D3gkXYfYB7Cp4Yu+zyHGstRZw1tDeVrvcOl7E1OPR+JJhXXU3ok6nZBtn5RjOFYJki+bXCA8 A81+gtAtN X-Received: by 2002:a05:6402:a00f:b0:667:247:b026 with SMTP id 4fb4d7f45d1cf-66b28a54e77mr2090258a12.18.1774639875872; Fri, 27 Mar 2026 12:31:15 -0700 (PDT) MIME-Version: 1.0 References: <2be31f17-5405-4de9-8d73-90ebc322f7d8@vondra.me> In-Reply-To: From: Melanie Plageman Date: Fri, 27 Mar 2026 15:31:04 -0400 X-Gm-Features: AQROBzDhPjYVrXm1kOZrr2E34daKCA24r4tQdiPtqyq8B91fyzSdPDA6aV-9PJM Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Tomas Vondra Cc: Andres Freund , Kirill Reshke , Chao Li , Andrey Borodin , Xuneng Zhou , Robert Haas , PostgreSQL Hackers , Heikki Linnakangas 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 On Thu, Mar 26, 2026 at 12:07=E2=80=AFPM Tomas Vondra wro= te: > > >> Ah, so we expect people to invent their "own" flags, outside what's in > >> ScanOptions? Or do I misunderstand how it works? (I admit not reading > >> the whole massive thread, as I was only interested in using the flags = in > >> my own patch.) > > > > Yes, this isn't really explored in the rest of the thread. I thought > > since the flags are threaded all the way through and they can > > set/check the flags in the table AM-specific layer, it would make > > sense that they could choose flags for their own purposes. They don't > > have to wait for consensus on getting a new SO type added. I don't > > know if this is a bad idea. However, changing the table AM wrappers > > seems more justifiable if we are making them extensible in this way. > > > > No idea. Do we have an example of a TAM actually needing this? If not, > I'd probably advise to remove that and keep the patch simpler. My past > attempts to future-proof a patch like this rarely worked. Yea, not allowing that doesn't really simplify the patch. But, talking to Andres off-list yesterday, he reminded me that users can simply add a new member to their table access method-specific scan descriptor (e.g. HeapScanDescData could get a new member). The value of flags lies in enabling table AM-agnostic executor code to pass flags through the table AM to the scan code. Besides my read-only hint scan option, he gave some examples -- like a hint to the scan that there is a LIMIT on the query. I think that is compelling. While exploring this, I realized that for a few internal flags, such as SO_ALLOW_STRAT and SO_ALLOW_SYNC, we have table scan functions, like table_beginscan_strat(), that accept parameters for setting those flags. They are basically the same as table_beginscan() but give users control over those flags. I think we can use the flags parameter to deprecate some of these specialized table scan functions. I think we can simplify the scan_rescan() callback as well. I don't think it makes sense to do it this late in the 19 release, though. All of those changes require having a flags parameter in the top level scan wrappers first. So, I think it is reasonable to do just that this release. - Melanie