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 1sjYyX-001ptv-E4 for pgsql-general@arkaria.postgresql.org; Thu, 29 Aug 2024 06:49:45 +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 1sjYyU-00G9kY-JO for pgsql-general@arkaria.postgresql.org; Thu, 29 Aug 2024 06:49:43 +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 1sjYyU-00G9kO-61 for pgsql-general@lists.postgresql.org; Thu, 29 Aug 2024 06:49:42 +0000 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sjYyO-001yH3-D9 for pgsql-general@lists.postgresql.org; Thu, 29 Aug 2024 06:49:41 +0000 Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2f40a1a2c1aso2789851fa.3 for ; Wed, 28 Aug 2024 23:49:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724914174; x=1725518974; 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=1obBwkiP4uTKniecGni46x/8M6U/cEdig4P603NRZn0=; b=byydthwS0PzdTtl6uoUncqj42rH7byDWy8fpaEWMvJvxKKOITfqUo/Eg2UIijhdrtL h093Aka8sOHDV/xD7xv71ZWm2uJMWYvUcuWIR6zA03DmmuY9KlgN8l5vxXg7jYRuIUfv OVTD641fWZ06sUnpSGhro6SiygkSfs3OqgIQbm1XbCA3a3mRqEg0bE30L1Gi0shF0wyq rovwtasJrlug0WQWhx4IL+8Lt/cKNufF3uSrCd9oQ9Zm3ttuUd0Xkf2LQq5TpPMKk6Tb KfadtwWkZrfnRn2BJ9ayUrTJkxwRjDo6MK5E3Cel/16RWZmlNokTmd8yIyJ/nbqVdfB8 aGtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724914174; x=1725518974; h=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=1obBwkiP4uTKniecGni46x/8M6U/cEdig4P603NRZn0=; b=YGfb8g8KD/psuIssh3tP2emtbJK2GucdrUQEn7TYC0G5RS0Adzzb48H+Ya0rKytJQb bT73EgLFb9llc/GjpZc08Een4+WcJl2GD7FsKb6Cqu3fI1qCuF7lCwv52ka3ngU/FIpJ warOmrtrISOTVRogIqdy7vYe0hq/GGpSFiyLWxWZ6AYBWxbaqE8+OR3IHZigqTbG+T76 b/WrjFhBAxT3V0SF8A7FYNUMAfc4Rz6WplxbkKsxOnlczXrHuRFBahKfHPFnWsKNw9lV Qo1W2yjKceI53MKkLM7Cbkmw9+VCtptOWftvgWxXzVpjU6ab9Z/x1DiTKkqTYiDajm5u coew== X-Forwarded-Encrypted: i=1; AJvYcCXV0EvGHERkujeflVohMBKUu7F4UM7XVzgkEdxKv1wUSK0p9Z1or/epvQxsM9VQHnSUaZPg2eJ4CAVBEzkc@lists.postgresql.org X-Gm-Message-State: AOJu0Yw/EG/JGmRryxe9RRFm0vh2jpq0c8vSnnKwmsSlC4vj2zMKDq/B 6XSrOvynUfWAdKatSTd19Ov1X8aQwDMsUsMldPt+745bBXlfo3otOfyTt83ZZ6n2hiEcqoN5Zn7 SNTJx/YyxCusDDaNj875Wftm43cg= X-Google-Smtp-Source: AGHT+IEWinRk3w2HYitm15FQSzmyeD0hg2nDKaSYRIoTMM4scyPVRcDalb/YPfPfMy+SJtl6JfK1aV4YXNQRESeFsO8= X-Received: by 2002:a2e:be03:0:b0:2ef:2b45:b71d with SMTP id 38308e7fff4ca-2f6103c83ccmr12374701fa.24.1724914173938; Wed, 28 Aug 2024 23:49:33 -0700 (PDT) MIME-Version: 1.0 References: <2962669.1724722813@sss.pgh.pa.us> <7b97171e276c41ec6ae4eeb8c2e8b47d@postgresql.org> In-Reply-To: <7b97171e276c41ec6ae4eeb8c2e8b47d@postgresql.org> From: David Rowley Date: Thu, 29 Aug 2024 18:49:21 +1200 Message-ID: Subject: Re: Significant Execution Time Difference Between PG13.14 and PG16.4 for Query on information_schema Tables. To: Justin Clift Cc: Tom Lane , nikhil raj , "pgsql-generallists.postgresql.org" , NIKITA PATEL , Patel Khushbu Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, 28 Aug 2024 at 18:59, Justin Clift wrote: > Any idea who normally does those, and if it would be reasonable to add > test(s) for the internal information tables? These tend to get added along with features and along with of bug fixes. I imagine any tests for the information_schema views would be for the results of the views rather than for the expected plans. However, that seems very separate from this as the bug has nothing to do with information_schema. It just happens to be a query to an information_schema view that helped highlight the bug. Those views are often quite complex and so are the resulting plans. With tests checking the expected EXPLAIN output, it's much better to give these a very narrow focus otherwise the expected output could be too unstable and the purpose of the test harder to determine for anyone working on a new patch which results in a plan change of a preexisting test. I've seen tests before rendered useless by people blindly accepting the plan change without properly determining what the test is supposed to be testing. That's much more likely to happen when the purpose of the test is less clear due to some unwieldy and complex expected plan. I managed to get a reproducer for this down to something quite simple. Probably that or something similar would be a better test to make sure this bug stays gone. David