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 1vlSBu-00CR4n-2o for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 13:36:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vlSBt-0095zK-2x for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jan 2026 13:36:10 +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 1vlSBt-0095zA-1x for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 13:36:09 +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.96) (envelope-from ) id 1vlSBr-002vJ7-07 for pgsql-hackers@lists.postgresql.org; Thu, 29 Jan 2026 13:36:09 +0000 Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-b88455e6663so142752966b.1 for ; Thu, 29 Jan 2026 05:36:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1769693766; cv=none; d=google.com; s=arc-20240605; b=DZL/34PiwILoS0qV3dWF2S7RtSf1yixlaOYkwaK9hNvNrPSemJWxavZ1WFtz6e0Vd8 RcCmNoxlODJwAQ361tZoy82k2fdM/QbCmJKtl6IbyVA5ACQQO/h4zD65RBDwft5Dte36 r4RGzYUUhRIcAH9uVtcicxTQuS5Jph2XzbZeuAkgXeP9CRoQS/gWT7em6158oCGiPzC9 HD+5tXHDDWht0B1lq6m5X0Acxbt1f+YpBRll46XBWZB513ICekUFtoEzrA8f/zIjwiUF qiJEWAuetRAyh75gg96n37G4nJqbIl+PGKC0BLMIAgzotdSxOXuJwnhwUhgMLa1gr5Fc cgTQ== 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=VwWU/sEfyhrfi5/sTLEaEP1n3kButp8JzFQ4OCUa1DA=; fh=0gQ8wcL0zz9Mlrbl6GPxbGWi3p0U1tSAyDx9C3kGq48=; b=Jm5t46OcRPq3AvS1ZSJBRGH3SpNLxAK/ltflGyL8XO3ig+ctTxR9D+Cz/5ez4ga3jz WBRWtl2IsB9Tp/OM2eqlayUOT2owLtm+NkImcWMrj+SYzyM3A9BEro5QKmGmlMhe4zaq Z38dgSGp1wPKW9zazJZJNMkFVZn4xHnk3Sx3nPdOJvmGftIR5eSfRiP9UAye8aUEUOWQ 3+bh0t8Vpuhzm2HkLuKNJJeSZEmqa8BDcl1sXNmq1yxpneIDbvu8CY/xbd0Jp/K6MLN9 LytbLVxH8oytIANlKVwlLGO6Zr3ufSMmqzpRTBYBiWjH+sj3ClVZxikIJ0Tm//3Vnbpj 8MAA==; 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=20230601; t=1769693766; x=1770298566; 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=VwWU/sEfyhrfi5/sTLEaEP1n3kButp8JzFQ4OCUa1DA=; b=TKN2fqdnLk2c6Rt8UEWFp8g1LjS6PVXhQNOYaFOrSWlMQanlPDOdKAbZGK89ZlE9Pq 0fawBgycegi2OgRz8Cf8IR+sIJGEUz7JAcCW7ceNglcWPkPq+MUetMSJRpR7PtKq67t2 BcC1Ttgkdwxbf8X0ZILcxu1BTgEkrQqXpwyfWgb8/7Kl+9OpD9/5rrpeRH+NYTq6uPjB DYa2UEbkYXZJRd13vZXCLprbsCCwRUw/EeVU5Kh9KQ5KjOb7Z3UboqX4Rc+3dp8inEXF zFt0NA4aJYpJ7RouuV/k5rSUZabR9sJIkXjFo9aasWq1JFC4+lriT0bRZkauUB9UH3K2 ERwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769693766; x=1770298566; 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=VwWU/sEfyhrfi5/sTLEaEP1n3kButp8JzFQ4OCUa1DA=; b=jBf9O0hOE0VfuSgBYxjX/v3CwhpasMz+00ZTmtbqjPnQ09wD2TRiED+mLL4puQ+0rb IoER+1FMV4+1YIOTub+INlO+UnwIAmuNJRFjKSK/7JEWojQeQqgiMMk5Bb+DnDFSFnYY wWwBFuxZB6qp27j7po6r+HZ6DiGkcNLqtaHxirfVDuuiHHGLhioji1dZj1horr6YKtAO 1XHR9Ht1fArmgGraRwCt/PQ3qH5+O1aEhtVO89nm0azwI4CcoqLvG3qEKX4u5oS+rLJB jx086iIkImcIbutxFDvw8OW+/hFhdwlxLcH3F0WlHf+fICTS1ft2JWhY8Vivn5+SbPmf vE+w== X-Forwarded-Encrypted: i=1; AJvYcCU98UpYS3J2uB07dDnhqNsVpL4CzdygE+pBHIDBRtl1Bgy5dJ3YU4gs3/eZujRwzInh+ig//uEw488G/hnH@lists.postgresql.org X-Gm-Message-State: AOJu0Yz+8JB560bktbtSG5GPdgPcm6zK0JtFL7reoUvC2m/Bcvf0PiQP qbs0uUeh/OnpdUXzmNbEHPRjvuOBWs00mhJnufUfrREuo72WwfrJlDUHIPpyPI3EG/MXt+72ur0 LMpDo7aohUkxHegpaQCyOX865u0ixXje6tA== X-Gm-Gg: AZuq6aKuOdK2iYdk6rTsJQFDx7S8kV41Veh3HN3nL67Yra7BthsQlX/39aLXKU013g8 1X/s7a6PcteWauawTEmUfH0F9KdEFHkSPIwluraYWJCoWu+BZpe9Fl//s/T8yi0ZSVTRDlZz4nw x4kgmc6oTpUg2Hq8aKSQYYiikn7tvZNHL+3MO6/8pjZX9gEoGS24gz1RKOWbXxlJgqxiSsBJFn1 M1leFUkHW3AAB9JBc7n45oNsYOXFgV7KajvzS+c3SiehUofxZaJp1VWU4bJD6RYn6kc4yMIdEjo WmcSMLWTzTqHEIVo5SA3iSHqcm8= X-Received: by 2002:a17:907:c807:b0:b87:d92a:f71 with SMTP id a640c23a62f3a-b8dab4144dbmr637818466b.62.1769693765890; Thu, 29 Jan 2026 05:36:05 -0800 (PST) MIME-Version: 1.0 References: <1136161.1769654478@sss.pgh.pa.us> In-Reply-To: From: Robert Haas Date: Thu, 29 Jan 2026 08:35:43 -0500 X-Gm-Features: AZwV_QhMdntEgxKY1-P3g_7t0lYliFZbhfTkr6P5rYZluIIYKTd7av9ShX1-f5M Message-ID: Subject: Re: pg_plan_advice To: Lukas Fittl Cc: Tom Lane , Jacob Champion , Dian Fay , Matheus Alcantara , Jakub Wartak , 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, Jan 29, 2026 at 12:45=E2=80=AFAM Lukas Fittl wrot= e: > The indirect relationship between those functions doesn't seem great > (i.e. anything that gets read in cost_material has to be initialized > in materialize_finished_plan). What if we just zero initialize the > dummy Path structure instead, like in the attached? This might be the right answer, but I didn't want to add more memory zeroing than needed without discussion, so I have just pushed a minimal fix for now. Thanks for the analysis. --=20 Robert Haas EDB: http://www.enterprisedb.com