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 1sOhUt-000dxI-FZ for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 17:40:55 +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 1sOhUr-003M9A-Bj for pgsql-hackers@arkaria.postgresql.org; Tue, 02 Jul 2024 17:40:54 +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.94.2) (envelope-from ) id 1sOhUr-003M92-2w for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 17:40:53 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sOhUp-0005YQ-Qb for pgsql-hackers@lists.postgresql.org; Tue, 02 Jul 2024 17:40:53 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 462Hecgj3114838; Tue, 2 Jul 2024 13:40:38 -0400 From: Tom Lane To: Robert Haas cc: Heikki Linnakangas , Peter Geoghegan , David Rowley , PostgreSQL Hackers Subject: Re: On disable_cost In-reply-to: References: <29821.1572706653@sss.pgh.pa.us> <591b3596-2ea0-4b8e-99c6-fad0ef2801f5@iki.fi> Comments: In-reply-to Robert Haas message dated "Tue, 02 Jul 2024 13:24:44 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <3114836.1719942038.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 02 Jul 2024 13:40:38 -0400 Message-ID: <3114837.1719942038@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Robert Haas writes: > On Tue, Jul 2, 2024 at 10:57=E2=80=AFAM Heikki Linnakangas wrote: >> I fear this will break people's applications, if they are currently >> forcing a sequential scan with "set enable_indexscan=3Doff". Now they w= ill >> need to do "set enable_indexscan=3Doff; set enable_indexonlyscan=3Doff"= for >> the same effect. Maybe it's acceptable, disabling sequential scans to >> force an index scan is much more common than the other way round. > But I don't think one can have a GUC called enable_indexscan and > another GUC called enable_indexonlyscan and argue that it's OK for the > former one to affect both kinds of scans. That's extremely confusing > and, well, just plain wrong. FWIW, I disagree completely. I think it's entirely natural to consider bitmap index scans to be a subset of index scans, so that enable_indexscan should affect both. I admit that the current set of GUCs doesn't let you force a bitmap scan over a plain one, but I can't recall many people complaining about that. I don't follow the argument that this definition is somehow unmaintainable, either. >> Could we cram it into the "cost=3D... rows=3D..." part? And perhaps a m= arker >> that a node was disabled would be more user friendly than showing the >> cumulative count? Something like: > The problem is that we'd have to derive that. The other problem is it'd break an awful lot of client code that knows the format of those lines. (Sure, by now all such code should have been rewritten to look at JSON or other more machine-friendly output formats ... but since we haven't even done that in our own regression tests, we should know better than to assume other people have done it.) I'm not really convinced that we need to show anything about this. regards, tom lane