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 1wjc6t-000CRz-25 for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2026 12:19:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wjc6r-0037d8-1j for pgsql-hackers@arkaria.postgresql.org; Tue, 14 Jul 2026 12:19:38 +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.96) (envelope-from ) id 1wjc6r-0037bd-0o for pgsql-hackers@lists.postgresql.org; Tue, 14 Jul 2026 12:19:38 +0000 Received: from mail-ej1-x636.google.com ([2a00:1450:4864:20::636]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1wjc6p-0000000091N-3Zft for pgsql-hackers@lists.postgresql.org; Tue, 14 Jul 2026 12:19:37 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-c15f6d667bcso525078766b.2 for ; Tue, 14 Jul 2026 05:19:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1784031575; x=1784636375; darn=lists.postgresql.org; h=content-type:mime-version:user-agent:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to:content-type; bh=lhc3TM1latxRNngMJKix2uLQDQC22xkXlVM6VrxCXLM=; b=DewgQdOTuA+5av1W670wXpGdvha5/e4DGXDQV5DgfpFVrlXnAJbyr0mRPCt2/MpzHU D9mlpFB+aHhktU6d8X48l6LgTS1RmypoFbiu6WyeB7W1pdIkbmgtE8+tNiscYvntxv3S hai5hUNrG8A0WntIz3FsokGC27BNRPCBI3dwN4KfGHLCD9mtVhPCzJYGqEjaMXykSThp Uxhde25F+WpDJX+gbHwubZ3Uolf72rRCMKX1ourOmySIfryRBjKRdaAGhVcq1VP9j/2E LvytO9gcBL3EYM8zjoyHNuB0SjksDdIVBFCnKEU+Lsk8p1DXJwa6Nrk7ktjllbSsUTV4 6zKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784031575; x=1784636375; h=content-type:mime-version:user-agent:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to:content-type; bh=lhc3TM1latxRNngMJKix2uLQDQC22xkXlVM6VrxCXLM=; b=InJmXE0QJJ4e0kSRlPWUqqTiAtblJiL3GH8uC0AeDH3+4zSBKIMN7kcE44HtNnGV+k JBYT1eBxWZ2KnWdTxwujozX2GqCKc3LM+ATvmKkQapJvUFbiKmjxRd9r7nil6jZdAeKi rD6vyJwiAvWrBhJJz07Wu43z35WzKz0xQCPQD9RGxxuj8xYnq3TkT1bQ/u7DHz+4Fbbd vYUlwOLHwEPCPAI1d719x/d2Zhzj7QD2R2zGIiAJuFXDqNMsR59iYzrKZhds22maLvRk oirD+a1J03kYuCdPkvzBbuxM7hDeHam1UaB3hzvuE20cLQHKzc5lydEn3Pv6HMRZjHA8 /eeQ== X-Gm-Message-State: AOJu0YzeUeyaORloyhm4EfGoA9FRT0qeNg+wI3P7EDrv2dA7Omvwob+W HVZBc+bJCEu+C6Akb7fJjYdNGVf1OoChc4yI+yCqRCdPyWZfH2xOQzo= X-Gm-Gg: AfdE7ckbDZPhR+V/y3MWNAbddXj5J0qKkRhWspwOycJQPKBsn1gERAHS+JiHUUryDGB wnqRk2NQ0+joqT0DajqPbBBUMfAFOhxPfcZvUXbCU5GR71eFFTVEF5vif9nkQZArokqHhGx2EAM +cM2XCSHYwjh0LSjhtbcsX6JgwPmjkThVDbo11d/bxNQBS9QYjbgNurLb5loefrYhD27g9QE6Bq Kj6nW4yHxJ5Kn0vtoL0Pu3Oo6y8ApNXJ3NnELmrZfaVLN+C+TyCXeHmTclLBnvzlKxl5jPgagKg 9/vm2CCva9ooYcgIB9iZyuJ3Dc3Hiy6wii6Ua/CWXPeePJ4J3q9Ijy/1Urb4FNxbCavOIw902yo NdUTUJqiyecSkw6+feFk3orCEHq005/01roGOYB1oLOOC/xaHcfp8qwqNi0sH3bpaobcPIZgolt pm1Til8zDAF3JVmO4V4AFwdKOuBcMaOdmLmv8lfbM= X-Received: by 2002:a17:906:fe02:b0:c16:4fc:2bc1 with SMTP id a640c23a62f3a-c161ea6af8amr549613266b.45.1784031574665; Tue, 14 Jul 2026 05:19:34 -0700 (PDT) Received: from localhost ([2a00:6d43:908:5803::3]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c15deea5cf6sm827561466b.16.2026.07.14.05.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jul 2026 05:19:33 -0700 (PDT) From: "Jonathan Gonzalez V." To: Florin Irion Cc: pgsql-hackers@lists.postgresql.org, robertmhaas@gmail.com Subject: Re: pg_plan_advice: add NO_ scan and join method tags In-Reply-To: <123bbb65-ae76-4112-b33d-864aca745b7b@gmail.com> (Florin Irion's message of "Thu, 2 Jul 2026 18:35:24 +0200") References: <123bbb65-ae76-4112-b33d-864aca745b7b@gmail.com> Date: Tue, 14 Jul 2026 14:19:32 +0200 Message-ID: <87qzl5pxuz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello! > Hello, > > The attached patch adds negative scan- and join-method advice to > pg_plan_advice. These tags are the complement of the existing > positive ones: I was trying to measure the test coverage of this patch and I found that the meson configuration wasn't updated, I think you're missing something like this: --- a/contrib/pg_plan_advice/meson.build +++ b/contrib/pg_plan_advice/meson.build @@ -57,6 +57,8 @@ tests += { 'gather', 'join_order', 'join_strategy', + 'no_join', + 'no_scan', 'partitionwise', 'prepared', 'scan', After the tests run only two cases were not tested NO_MERGE_JOIN and NO_NESTED_LOOP, but these supposed to be tested, well I'll dig more on this one a second pass of the review. During the check, this came to my attention: + case PGPA_TAG_NO_INDEX_ONLY_SCAN: + return PGS_INDEXONLYSCAN | PGS_CONSIDER_INDEXONLY; Reading the comments I got this: When PGS_CONSIDER_INDEXONLY is unset, we don't even consider index-only scans, and any such scans that would have been generated become index scans instead. On the other hand, unsetting PGS_INDEXSCAN or PGS_INDEXONLYSCAN causes generated paths of the corresponding types to be marked as disabled. The message is a bit confusing but, I think that `PGS_INDEXONLY` should be the only option here? Otherwise, my understanding is that it will disable also PGS_INDEXSCAN, which is in the next line to be disable. Regards, -- Jonathan Gonzalez V. EDB https://www.enterprisedb.com