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 1w5u5g-003k2S-07 for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:26:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1w5u5e-006T1i-1I for pgsql-hackers@arkaria.postgresql.org; Thu, 26 Mar 2026 23:26:14 +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 1w5u5e-006T1Z-0E for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 23:26:14 +0000 Received: from mail-ed1-x534.google.com ([2a00:1450:4864:20::534]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1w5u5b-00000001NKi-2lYY for pgsql-hackers@lists.postgresql.org; Thu, 26 Mar 2026 23:26:14 +0000 Received: by mail-ed1-x534.google.com with SMTP id 4fb4d7f45d1cf-6644a3029b3so2465504a12.0 for ; Thu, 26 Mar 2026 16:26:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1774567570; cv=none; d=google.com; s=arc-20240605; b=beRsvks4y7qOeXdagYrWwmiPtBmpG67UekaQSprSYZA/rNgeAPvZZKb6kjzUPKM+0s RmN4ADBcFFbAINp+knBJ+NFV6TTxgnR8dD69C1isTtRcOKDv7hESWgWpvEAaB252uKto Ku5viNkmEsZ50hS+z7gJVA0Ms7z2gklFe82KuKA94jzzoFjSczIlA9mTRONJ0a82M/E8 M8MdYFpck8o2Sfw0y43sTB1alPposrq/cq4pMHxeRYvye+1srIz2A7Lmt3j94K0K/4bo eKjOH5q6NYqa9j8hxxutjvYYO37mVeDT4swVmMQVgp5ClTO7tJdCJ8lQAc7D8BYB/Fxm wIeQ== 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=k9iyTO8Mz0vu4cs6cKNHafya2sID2gRu2yOspmNNpu4=; fh=DffESHZSJ59wdQIFxv24n+Qf3PEWnESbtr/VZt1/xZ4=; b=GQoNh2lQ0sCD07vtP04e6eD6zXd/f7+Q7CwI/BFVjo42uJKbJgx77y442Bfd7A7EWx Gu/q6aKu7wfXkd4EfY3xHz353nA2tLJqDyCTrufiaP7BkyQm1/6x6Lb6EM0tuXmuZxmn fijyHKZ7oY/m839O0BlsPdlCOzi5LukkzhgpwvJDxmBkNrkrHo51lEwUxsJC6HiYb3U0 kOVCBnXd1m6KidBSmQa6owZbRaQ2uMFq40h5NPquUG90aHC4F+dUjGKVYdQlZHMfxlSa n5g1WGRSYssfZBVKcHEwTV1QHbyN+3tMU6sFfnAnyqrvCsw5TIX4tOwzPgvZMvcNxGIa JmZg==; 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=1774567570; x=1775172370; 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=k9iyTO8Mz0vu4cs6cKNHafya2sID2gRu2yOspmNNpu4=; b=hT7+mdwY4KNkqVxZn9jV27tGCdC2dbdm6kML/9ddh1b1xaPuDLEGx8KIsd3tAOf5IC PVAYkkhOEvwjzThOhY4QsRu0Gt1nrOs52PaCVWyoGZs0eYiyoYLA3Duu3plLSdBFaYcT RIFrPdjI4G7rTEII0My2ZKnVXZXWTzKmFudryqX8CzGQuF3eSensY16CGl2VZyKsH+QW lqgJjC4WsloT05DCAswGBVTUdHEWMjvkhIEDWX/c6W2pqx266l5or38OHjaKCsXHtkB2 6M2Qt+2IT9hxWAwSF9GgmYl2BiGej+5AtLK6Wf3kKEe7rSgNTCfS66I0A/YatD8KUFt3 pcKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774567570; x=1775172370; 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=k9iyTO8Mz0vu4cs6cKNHafya2sID2gRu2yOspmNNpu4=; b=T6TgZA40zuxkGJQv7/a4DhdRTMryLtO80AGBjcUqAqQGANqUysJgge0zRskqyoDPmX Dc4UVolWuf51DVOeE4myfhysWXGJuWYZEy7h7leJImXOazeR3SlfF5m8qdT4PDIETVEB u2QIRZsAClIUkG01XImikXVBEe3qFXhBz1kA8XRxCM2UF9ZFNfYwqyal1+GNPLvwNwuG 8kGgn8FWn0IkDs4NflqgTYP+9mER8gKm/+2ukDTvZqO/BwhOu66CxMqGSZVJc54/8cNX gbTCQkkdzCEvqIp09l+q5gH+jVIznfElXBsZjP6tHB4C6RNDAWXPyDbxjEnV5ebrUZ7s ACtw== X-Forwarded-Encrypted: i=1; AJvYcCVJ/gyzOb84KquG5vInFB7iO9eDhSmOu4nk0/o+gao7Nx+tU7jADlw6/TdR13inT/aSvkbbnMKYw9EMhsa1@lists.postgresql.org X-Gm-Message-State: AOJu0YxcNeXck2SAPb/AoOsXCOqnyAagykdziEV33Mj/Zu93oNX+DSwq EoeHOWyUTU9VYUaAC7E/oB9PuwyK8h4zgJzTbxsm2UJZkb5a+b6uvOLzPA+eLriKiHh8Dijoe/d h6qSdxwIOzBWiz6bYLqyuG425dvez6yo= X-Gm-Gg: ATEYQzzTm70VBPhC7630NQnR7esIhdF8zDDHCvl0h9ROg6ADwA+UkikrDOeAtk7HdEn ozLqMaRTBsi+G9d1J2HEJJwRKTsg8GhEVkaRc/QRyWc4USdacVZ01fQSfk/Wfar/GzG7TWi/ph1 f+wdyVF4hsFO/AZ/hI0vrDUGX2rDKySWSx0fEPzqAYrg5vC3RgonBwvCRdsfYQTFTAB22+jMjB+ 4YRUDOlmRtTCt8yUQReQSKD40Vg5iXS/SnbgkT1yEisC0+oHIMFbcfE9qTccnGWb4064a0sUbXY WmVnV/k9dK/8NnvPYmHTrWOy2zdAV38USv4Vp7U= X-Received: by 2002:a17:907:9c07:b0:b9b:308f:d9ad with SMTP id a640c23a62f3a-b9b502e30edmr16056966b.19.1774567570192; Thu, 26 Mar 2026 16:26:10 -0700 (PDT) MIME-Version: 1.0 References: <1136161.1769654478@sss.pgh.pa.us> <1299934.1773938807@sss.pgh.pa.us> In-Reply-To: From: Robert Haas Date: Thu, 26 Mar 2026 19:25:57 -0400 X-Gm-Features: AQROBzBTqHrpwbP8KWyaB8x4Mp2ZEY61mxOmZyjAvDSQg3DAggXncipXxPchyWs Message-ID: Subject: Re: pg_plan_advice To: Lukas Fittl Cc: Tom Lane , PostgreSQL Hackers 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 Thu, Mar 26, 2026 at 3:52=E2=80=AFPM Lukas Fittl wrote= : > That said, reflecting on the change, I wonder if its odd that we're > copying a string pointer instead of making an actual string copy. I > think that's probably okay in practice? Normally, all of planning happens in the same memory context. Under GEQO, joins are planned in shorter-lived contexts that are reset, but I don't think a new PlannerInfo can get created in one of those short-lived contexts. At any rate, there's no point in having two copies of the same string in the same memory context. > I'm still 50/50 on the naming here, since we have the alternative sub > plan that has an "alternative plan name" that's not that of the > alternative itself, but rather the base plan that was utilized. But I > see your concern regarding the naming being confusing in terms of what > the "original" or "base" would actually refer to. I've also considered > whether something like "alternative_plan_group" could make sense > (since all alternative sub plans will have the same value), but maybe > that conveys too much intent on what this is used for. Let's go with this for now, and if a consensus emerges that I got it wrong, we can always change it. > That said, I think for now, to get the buildfarm happy again, v23/0001 > seems good. > > v23/0002 also looks good. Thanks. Committed. Nothing has obviously broken so far, BUT even machines like skink that were failing weren't failing on every run, so it may be a while before we get a clear view of the situation -- unless of course this didn't fix it or even made things worse, in which case we might find out a lot faster. Hopefully not, but then I thought this was going to work the first time. In the meanwhile, we should try to make a decision on what to do about pg_collect_advice and pg_stash_advice. --=20 Robert Haas EDB: http://www.enterprisedb.com