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.94.2) (envelope-from ) id 1tlj1G-001W3n-GX for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Feb 2025 06:29:47 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tlj1F-006H7e-2X for pgsql-hackers@arkaria.postgresql.org; Sat, 22 Feb 2025 06:29:45 +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.94.2) (envelope-from ) id 1tlj1E-006H6e-Ov for pgsql-hackers@lists.postgresql.org; Sat, 22 Feb 2025 06:29:44 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1tlj1B-00063V-2m for pgsql-hackers@postgresql.org; Sat, 22 Feb 2025 06:29:43 +0000 Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2fbfe16cc39so5711148a91.3 for ; Fri, 21 Feb 2025 22:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1740205782; x=1740810582; darn=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=vhyYhOfgTb437IG/0yt5WP63RQ3eduh9unsZgd0CvU4=; b=g3K2v6SbYMU2r9d/FjaHgFTNaJ8Vr8anbpssLbfEmFoSptVetCGL7HXAF69UTd1E1r eV6QL3SWB+1ap612VU3qmwD/2YCLFU+zpniRgIyoyOBw6MwFwE3wVYPDaPlsjAR9wgJs F2gkfMzp/LILT7/QjN9nEZqizlhydVRlSxlYQuBdalNcMuohNYtcdvSPzl9LKf8WGn5g Y1aIxkXU2sM4mC7vCSPRHL+pY/q2gti9tMk6GqaKX02ev89a6RWTBNRt+o/l0jwqGSqa 7GYTYuu7egPtwSA6y/naKDifRkwnVflQSbFgWrc0SNLhW6wVunMcODkj/xD4k3Zt6lbT 3dPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1740205782; x=1740810582; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vhyYhOfgTb437IG/0yt5WP63RQ3eduh9unsZgd0CvU4=; b=kewiamCWzSA9cX+Ov22n7C+v3ToNs0DPeSVP/cav+HU3sjwsZI/7+CeMIXajCunN6N XY+UxOsxO/3QjUzipvZQy53MWQ+4+E1bwSTbbi9yYOaFK6FFmCDp3jEjFI2ThDO4rR5H iXlOckgRWClQvgIPgvZD4lDi1zBPYZhRq+FkoUhVZmcyt3C8Rh6U5822rjRx+0qPCUwJ vXQRJSgyg399GXmzE++/JJ9YXRF+4cZHMIPCntqolc8A6XZMttGaOxv0He7LNwW5/jME v5exfvhsRCGZbE3ndbiH8VlaImZHSyj9xaajqs575lfPOiRNXkigds0tr9nL4EvfCfbS MddA== X-Forwarded-Encrypted: i=1; AJvYcCVSL+hwgF3RvvaAmuQbsq0iVjBE/039UR268YswmV1/yTv3/AXE1rujQpSAZAhJaSRmlS2f3RDajCjoH7ke@postgresql.org X-Gm-Message-State: AOJu0YyRxGArM9qYio63w+71Re0etW7WhysLyRxCYF2rm07adOu7g7Aj yKb9KG4SCSBPi3+Bn2PKLsh3LipqhtHsIdmtUwLv3vGyMect18O3IICeaTykUeVXETN3GMu/Nn2 LWRdBzh/yFWC6uoyeiexvySJd3U8= X-Gm-Gg: ASbGnctvYwnCZooj3+fw0/1KJxychjRVIkT7NHmD6IpAkWyYRLHlj8Cqj3i+R2CzXbC ZU/nGJ1ExhuN1fyvmO0ptGZWGGlSyibGIkKGH5uA8EQyLm/Suc9QI6WSWnjjDpALVkdpWQgu37C LRx84ea7DFZtCTMzGr4oJJlIZYnrdIZt4rkrahLTbk X-Google-Smtp-Source: AGHT+IEwG9nGTpiugJB28amx+yeIx5m5nyYVTgaoz2TbSeDnQO2re+plcEObL4zHSBVe+8upYl6nn4K5z5PEyyp8XcA= X-Received: by 2002:a17:90b:4c8b:b0:2fa:b84:b301 with SMTP id 98e67ed59e1d1-2fce86cf0aamr8830706a91.20.1740205781831; Fri, 21 Feb 2025 22:29:41 -0800 (PST) MIME-Version: 1.0 References: <54c35fb9-da3a-4754-ab8c-46ed0b612465@vondra.me> <684c70d7-180e-461d-9377-600c2db581ba@vondra.me> <2990641.1740117879@sss.pgh.pa.us> <3132441.1740153303@sss.pgh.pa.us> In-Reply-To: From: Amit Langote Date: Sat, 22 Feb 2025 15:29:25 +0900 X-Gm-Features: AWEUYZlvSZ_VNuRNIXWZSXfiT6vIwByvMwxUYZYbz8DTfUMICl_GI8S9TqkMOPA Message-ID: Subject: Re: generic plans and "initial" pruning To: Tom Lane Cc: Tomas Vondra , Robert Haas , Alvaro Herrera , Andres Freund , Daniel Gustafsson , David Rowley , PostgreSQL Hackers , Thom Brown 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 Sat, Feb 22, 2025 at 11:13=E2=80=AFAM Amit Langote wrote: > On Sat, Feb 22, 2025 at 12:55=E2=80=AFAM Tom Lane wro= te: > > Amit Langote writes: > > > The short of it is that the cached-plan-inval test in the > > > delay_execution suite can never be made to work under > > > CLOBBER_CACHE_ALWAYS. The test assumes that locks on partitions for a > > > reused generic plan are not taken until InitPlan(). However, under > > > CLOBBER_CACHE_ALWAYS, generic plans are never reused, so the test's > > > assumption never holds. > > > > Ugh. > > > > > I see two possible ways to address this: > > > > > 1. Find a way to disable the cached-plan-inval test in > > > CLOBBER_CACHE_ALWAYS builds. However, I haven't found any other test > > > that does this. > > > > > 2. Remove the test altogether, though that might be too drastic. > > > > Well, you could force matters with "set debug_discard_caches =3D 0" > > within the test, but I think that's just a band-aid that would > > not make the test fully stable. The point of CLOBBER_CACHE_ALWAYS > > is to model random arrival of cache flush events, which is *always* > > a possibility due to background activity (autovacuum for instance). > > > > We do have a couple of other regression tests that rely on > > "set debug_discard_caches =3D 0", and I've not seen many buildfarm > > failures tracing to that, but I don't trust it a whole lot. > > > > How badly do you want to keep this test case? It seems fairly > > rickety to me, even without this particular concern. > > Hmm, yeah, I have to admit that even if we address this specific > issue, the risk of this test failing again outweighs the likelihood of > it catching a real breakage in the deferred lock mechanism. > > I'll remove the test for now. Done. I'll try to think of a more robust testing approach for this, but I=E2=80=99m not very optimistic :-(. --=20 Thanks, Amit Langote