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 1wDTDl-0030h7-1S for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 20:21:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wDTDj-006jBe-0L for pgsql-hackers@arkaria.postgresql.org; Thu, 16 Apr 2026 20:21:51 +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 1wDTDi-006jBV-2d for pgsql-hackers@lists.postgresql.org; Thu, 16 Apr 2026 20:21:50 +0000 Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wDTDg-00000001Sgr-3Vue for pgsql-hackers@lists.postgresql.org; Thu, 16 Apr 2026 20:21:50 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-672713f953bso2429373a12.2 for ; Thu, 16 Apr 2026 13:21:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1776370908; cv=none; d=google.com; s=arc-20240605; b=SEXotOufQ/nSxUkZersCSDdyLbS+tn12Uc/RWYv6tMD5cBNydNdvOfuO3VVhWMwb0E F7qaPoeLVompjKTqXTmtU9WNi7LAFc8GKEcJo4PgXfcF6Dm97sMqn0W500ygBC4b9nqS 4kJTJHOgDKszedP/PvBwUIFpda6OD1Nq4F7U6/k10dQJ+LfOCATUdRTkUzFHthLxM7jk Knn5jtrmskNLDXgrQHcshZV3VRNxXKU8CTiHgckZInwOnZxdpv3Dm89n1AqzIDQkdu91 sRW1SQgkFUYa5rlu/ylpuyuS8PFmJvht8oO9od29p1efyxh2QPQzPlGmx2SWfH56wSuT lzMA== 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=6w9U9Yvq1gclV/26/2bh1P8hJnImxDKG6M9DTrH8Cno=; fh=P30zgwS9f7cLRmdYPxd5n2N7ESkqarjLEaSfShxfRco=; b=TvGj+FL6225AZkmU5jwpMxYgV6i1/R/xmBip+SVVCukcT2LPyk8Ab8VfVlScECgtQt xp1pLZV8+i+QbJ+B+Ma7944JKJynKpMyL1uPLHGAf8y46bf1B2bQPeJIedNk+80aoj5d A42KruiEEJ86TrSYS11wK8Jr8qIi9beBWU+ol1juVZhAT9LeyaK0kjE6Dw1GR8LeotIt JnrtLF3EChDjoGNHoX6UaifNxs69dePmyh2W41JGnw7Ej+24uW0EjfAZEqX3rCyb3pMr cDxnzgRW+FjUhUA0dbuAH/cMA4WmIh4UPahW+L/hNOxmitxZJibfyygs900v2iDbQNOo efGw==; 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=1776370908; x=1776975708; 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=6w9U9Yvq1gclV/26/2bh1P8hJnImxDKG6M9DTrH8Cno=; b=FTtG0jp2U7MhjlAnUNtZA64oiaUcevR/vvh0Jcmx0z9jRHIO8QEFvOs7RhXMP3/PtM 1YUWTjDfsG08hJqlsXS5iP9Ngn3aZndJ0ffH1gvfXYBTY/892FGhWbfPL0+k2nyTzGMD gD7DAWEedfeJsqAXprtIQ9QP1gJaOJvU+ohRbhUvTWleV/klKzV356m8YqguuyidTQeI qTwecU2f/6Cm9aFVsO9vchYoOq5wVB7SH9dScm0aAGAFKIaaOCDbxn0e4mdGBch7Am1S dbst7evOHpeGpX9iNQBLKbe2i9pCKMJRTUEi/kZakwyx4VQLMHHoP5ZtEQ6jtoIAMEhD XbOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776370908; x=1776975708; 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=6w9U9Yvq1gclV/26/2bh1P8hJnImxDKG6M9DTrH8Cno=; b=mlhlUaZeHWFnN0LPuZam8SAQN3eS/SmEfxCr1sOCe8TBitzOm4YCmdWxDwuLfDO9c+ UbwI3MnPFvo8oEwRGbR4dB7d9w+XnVGvaYERPvkYhKnRd3AaEQIwDYyLXBorx8W62reQ B4yWDrt8ytylP79YMcbRzuAMmeI/u/GaE/AWuzya/tjlLdblQ2bGobWCMtvPylXGBYNY Hx9z3EaEAy6/wKzpb6vYxTZe0y2beWGU4nBEc+sraQ2IkamfFFGKbdgf3/gj4IM3HsFK BlQyS7M6+Gt41TrNUzkPQnFX/2lr6bSLOXk4iyW5NusEcUm3oj2Jx5aXiaLLrEdDGbBS KV1w== X-Forwarded-Encrypted: i=1; AFNElJ/etvlNeQ1vGAUqA5NMIlcATiX08AHmhfgSUOHmprX6R1CEVtkwDds2FKG4BJwnOvtSGXq9ybN5nIdyVJ44@lists.postgresql.org X-Gm-Message-State: AOJu0Yy5ifvtIK8xg+Ul1C11PTaSTH3G+NX5s6n9LQKiwXlVoh8GMFPa YrNn+ncC50UrFKF2W9TBFmO5EfFe1tOkobKToNbGQEBwWCAbFkTVNRd2kUjNq62Q/S7RJ5gPiH4 HsD8vS3jHxeQaQ6bGajcyv9zSabHIxCU= X-Gm-Gg: AeBDiesD9kvsJRd4BLqZZ6sBomLCUPuq8d+p0cnrciQ/fxL9s+A8sOqjg+cjR18vZWa zXyYbGmB2cGIzhizK6rC2TZ8sU9VBWYb7gjHkpsZUJoUUGmE+uEWQKGusxwDvL13K70BxSC4wJ0 Fo5rAVj+Xg29NJpC3X7QhLTXSw7r3C+hR1lh0qTb4xdXZJL8U4JwzVgCFAxvxcNkDFMB1c4r9jU UznjHr+je6X7VQTN/cMGv3zlk7nRNVh4eM/1PGevDwRLCwzgj2UWQ8i13IxHt2IzobocZcqPCW7 Zd1EaSG+ErdzzGQ4TREYQGD9KL9F8CLXpJjwQd2CEJAZaUXrt64e6TBo/+E6p4OuIbiJQ7hE2BB /Lb4Oy2PKo3u/Rtv9wyQ= X-Received: by 2002:a05:6402:5483:b0:670:8add:2b98 with SMTP id 4fb4d7f45d1cf-672bfdc94acmr52296a12.14.1776370907611; Thu, 16 Apr 2026 13:21:47 -0700 (PDT) MIME-Version: 1.0 References: <2be31f17-5405-4de9-8d73-90ebc322f7d8@vondra.me> <97529f5a-ec10-46b1-ab50-4653126c6889@gmail.com> In-Reply-To: From: Melanie Plageman Date: Thu, 16 Apr 2026 16:21:35 -0400 X-Gm-Features: AQROBzDjGe4LQwc8AZ20AbeZnrMn-98-hO_6V5jOM2NpxoyqOsT7CzwVQBl7D7E Message-ID: Subject: Re: eliminate xl_heap_visible to reduce WAL (and eventually set VM on-access) To: Andres Freund Cc: Alexander Lakhin , Tomas Vondra , David Rowley , 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 Sun, Apr 5, 2026 at 11:49=E2=80=AFAM Andres Freund = wrote: > > I think we should probably just have GetLocalPinLimit() return something > considerably smaller than num_temp_buffers, e.g. num_temp_buffers / 4 or > so. I think num_temp_buffers / 4 seems reasonable for GetLocalPinLimit(). We'd also need to make this change in GetAdditionalLocalPinLimit(). Making this change fixes the specific case Alexander pointed out. We will likely see an impact on performance impact because this will keep the readahead distance substantially lower for temp table cases with only one read stream. > There always may be more than one scan going on, so we can't ever promise= that > there's at least a certain number of pins available. The main goal of the > shared pin limit is to prevent one backend from pinning disproportionally= much > of s_b. And for that eventually scaling down to just needing 1-2 pins pe= r > scan is sufficient. With the last sentence "And for that eventually scaling down to just needing 1-2 pins per scan is sufficient." -- how do you mean to relate that to what we will do with local buffers case? - Melanie