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 1vaOL9-007lYu-22 for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 01:16:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vaOL8-001Sgo-1l for pgsql-hackers@arkaria.postgresql.org; Tue, 30 Dec 2025 01:15:59 +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 1vaOL8-001SgZ-0U for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 01:15:59 +0000 Received: from mail-qk1-x72f.google.com ([2607:f8b0:4864:20::72f]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vaOL6-003UA9-0l for pgsql-hackers@lists.postgresql.org; Tue, 30 Dec 2025 01:15:58 +0000 Received: by mail-qk1-x72f.google.com with SMTP id af79cd13be357-8b5ed9e7500so654739885a.0 for ; Mon, 29 Dec 2025 17:15:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fittl.com; s=google; t=1767057354; x=1767662154; 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=ynqZHZM5/VMwVE0Ev9wOh6wV/ZuPEyhqRt1v8iJjTD8=; b=fhFcYjjSw3zlLWTHuYzmrb9tkOCC6nPPBY4syIHckf9DBFaGFIp4UoT1VL52I/H7Dk v7o4Sae3RdljRG93GfW9RtMXakHq81NbKhOzgBJU9XAUpKI9qZAmt54ivu2JSkotdvI1 b2HuT1KseN8FoLdkto4qeVPSTaUUUnAhUe/bU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767057354; x=1767662154; h=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=ynqZHZM5/VMwVE0Ev9wOh6wV/ZuPEyhqRt1v8iJjTD8=; b=gjUPBdKkwoXhd7V9ujiPqYgrLoVvW/eXLX4Jr7x8RRW5pvVtG71vTUNJdwJ/iaAzNK mRxoh4QWHniI01uf1gQFeo2sG5CZpj+iM62S7XoWiLQ1/Nxb4iHYs/ZNEoua2bJ58SKJ MdD6GWeqmJY0eGGzaaq+TvJhYMScwdlvI0mDCJaDw1e88rN8dgtCAbi2P4kIiw4BmMkl ZVW1dDYMsgArOP93GMVImWO1ctp3g9nzAtbwkmL2kPA85qpwtzIWFN74Zs2p6++p4Ri8 v7v/l5l4gVJfiXHiyGvHKPwx//AUwxjKifn2YKDueab6RQzppMiQ2wJiYmxlVGZLZ39v uK2A== X-Forwarded-Encrypted: i=1; AJvYcCVybjbpLRdqGSerPOn5xxNL1T9GejPenO/yAHtt/CRX/R4VTDkZZdiUf1viuHGlrDMzLQvgaQraltpg6xzv@lists.postgresql.org X-Gm-Message-State: AOJu0Yxim/iCxHt0ATeVgW8YhSovx6PLR8PqHwIc7bF4+IqVsh7aiQY/ UqEgEWeD9S4YXBwldwMNCRrqbiPoGnhole6WPt3P5FL8Q7QbtJ+IJfcCrCrf/WMeWxQgX8rUvbo pdjCsa2f8L794TdYqANBOESxR6cB+CifPtM4C99zA X-Gm-Gg: AY/fxX4bm0r7EQYit2zNOhP9YE8BoF1cRK4FhVZt96aZQpzuOyHWTprywjSAkbfKbed JKATdGkU0cthTRCfgt2xz+0G9/j7IKUUnADQ/tEUgrsduwXaXKyU4Q9C6uQfM+jqbmMCd4mVSdT 1fRP8MfeLAmILAZ62FhV0EgmTxHTB7LEssPjU054EFTOY6WHOrHq2LLBGr+JLAw6fcVw4r0/20q c1pygGobU5J+vKM8kUSrBVmrHf4EL8FaCj7OKydUUMfWEB7vtUVC+IdvmyrMrC1SatXVMRZaNvn 2IswGwJf6/oLqCckhBXyYXd8X0w2BXV5cUfVTp2cl7Y89dElUS0v2O9ZJmI= X-Google-Smtp-Source: AGHT+IGTMoAlMVHGMkgaXwDDOiVomeD8yaRY4nnXj+TJgAbJ9VBheXo8BBrhhfPqalFXs4sYbnWkyZJhKtYr0Qc03U4= X-Received: by 2002:a05:620a:472b:b0:8b2:9aba:e887 with SMTP id af79cd13be357-8c08fbdf8d5mr4299501785a.24.1767057354385; Mon, 29 Dec 2025 17:15:54 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Lukas Fittl Date: Mon, 29 Dec 2025 17:15:18 -0800 X-Gm-Features: AQt7F2pSeWMmx2RLSxe9Vw9VPwBb_88dXHzjsDvn1SuXZftsSQCsQDodBPCwlQ4 Message-ID: Subject: Re: pg_plan_advice To: Robert Haas Cc: Jacob Champion , Dian Fay , Matheus Alcantara , Jakub Wartak , PostgreSQL Hackers Content-Type: multipart/alternative; boundary="000000000000e7f86106472119c4" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000e7f86106472119c4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 15, 2025 at 12:06=E2=80=AFPM Robert Haas wrote: > Here's v7. I'm excited about this patch series, and in an effort to help land the infrastructure, here is a review of 0001 - 0003 to start: For 0001, I'm not sure the following comment is correct: > /* When recursing =3D true, it's an unplanned or dummy subquery. */ > rtinfo->dummy =3D recursing; Later in that function we only recurse if its a dummy subquery - in the case of an unplanned subquery (rel->subroot =3D=3D NULL) add_rtes_to_flat_rtable won't be called again (instead the relation RTEs are directly added to the finalrtable). Maybe we can clarify that comment as "When recursing =3D true, it's a dummy subquery or its children.".