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 1szguc-007URw-Fd for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2024 18:32:22 +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 1szguZ-008GOg-CO for pgsql-general@arkaria.postgresql.org; Sat, 12 Oct 2024 18:32:19 +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 1szguY-008GOX-UA for pgsql-general@lists.postgresql.org; Sat, 12 Oct 2024 18:32:19 +0000 Received: from mail-ej1-x62a.google.com ([2a00:1450:4864:20::62a]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1szguW-000iES-5T for pgsql-general@lists.postgresql.org; Sat, 12 Oct 2024 18:32:18 +0000 Received: by mail-ej1-x62a.google.com with SMTP id a640c23a62f3a-a99543ab209so439495466b.2 for ; Sat, 12 Oct 2024 11:32:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728757936; x=1729362736; 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=mA3ttxnWiiEozf1n6C15mKNJxzjKfHfIkBar8paqwQQ=; b=JX6gAdRK6k10P6qf2s+zG1BHkx2dtAN9XEBvcWuvOyifwNTs1uydiixYRRf+18mDpC puvfwD29LH1RuNwdmKL2R4nb7I/P3r+VPRJfsm8/KNFFRlugvTMYMVymUnKaSucwx0F8 YNx95oGAfYuplu+kFqth6THMbrYybd8wf2FY2UTLew+FBrC1b+VX1s1xNwxUX/OG4oMt 3DI/jaslt2mzJCLsXvq7x0wd61xk4pf/saAxCp5qO2Ey7skSf17mJZ2r58Nm3Ry9m77k zSnbEMXF3LDhqDL6HOLa+9mN1j4oViDXbMiGNKcjvFbarthGWrP/e7ygGJmxzE2CylMX qneg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728757936; x=1729362736; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mA3ttxnWiiEozf1n6C15mKNJxzjKfHfIkBar8paqwQQ=; b=Ue0R0FG2NG4NujSfH5eg+TnT8i5x03mMXZmm+2RVaDMyHnnUeL0msxzAtOxwpPu5ZZ 3dULNXCLNG399PpO4wadJBPKgQRISLzEFVST/jw6yjCFP3K+KpdU1Hh0XRU22WpZBhao J0r/ylI/FbMajboP+RQKuK9zMqCOxbFlIW5vlSIZFGDN8cfd/rv+c0RZ+He/fKJk8e30 QvXbPwmu1VCn8YkuYR1VGNVbIbD9GA06QXqr6n+PuTB8r01/MRxTXDgpUBX5pShXmCKM V8i2h7RuhTeheg4nhkztiFs18MJtxpcmU0FtBFLNsOJ8C67462QeU9SL0NOd+w/VOuId sCnA== X-Gm-Message-State: AOJu0Yz3gKdg8+gJPgUO9IVscatYCkeX7DAseIVqV1KaZ6Gw+E3DqCiJ D0Sd1Mu53kznBUvxyrb2gdmjUvsI7l2sAcS0tW7EzV40/dE9SNAOU6J5bKoFUH5z2nY+r4QJ0s7 LQPhnbw2LIVJM7HjQmAgnv694wd+CJQ== X-Google-Smtp-Source: AGHT+IGJt7Azl+I3WWUpFAetKyUWxok6UdpNSHJCYK+3FT+/kB9T2p5Xo7D+Ch9m0EL5VzufaTcZQ3tNw8CwXnzRDzQ= X-Received: by 2002:a17:907:3f03:b0:a99:c9a4:a4da with SMTP id a640c23a62f3a-a99c9a4b767mr471219666b.61.1728757935354; Sat, 12 Oct 2024 11:32:15 -0700 (PDT) MIME-Version: 1.0 References: <302362d2-ce6b-4bec-9b7b-a845a982f4cb@aklaver.com> In-Reply-To: <302362d2-ce6b-4bec-9b7b-a845a982f4cb@aklaver.com> From: Koen De Groote Date: Sat, 12 Oct 2024 20:32:04 +0200 Message-ID: Subject: Re: Foreign Data Wrapper behavior? To: Adrian Klaver Cc: PostgreSQL General Content-Type: multipart/alternative; boundary="000000000000a3be6906244bd29e" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --000000000000a3be6906244bd29e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Ah, thanks for that On Fri, Oct 11, 2024 at 5:59=E2=80=AFPM Adrian Klaver wrote: > On 10/11/24 04:08, Koen De Groote wrote: > > In the release notes for postgres 17 I'm reading: > > > > > The PostgreSQL foreign data wrapper (postgres_fdw), used to execute > > queries on remote PostgreSQL instances, can now push EXISTS and IN > > subqueries to the remote server for more efficient processing. > > > > I'm confused as to what this means. In older versions, are parts of > > queries not sent to the foreign server? Or is this change meant to impl= y > > the sending of only the subqueries, the result of which is then directl= y > > used in pushing the entire query? > > > > Or am I still wrong as to what this means? > > > > I looked at the documentation and there doesn't seem to be any > > indication of particular queries not being pushed to the foreign server= , > > so this wording that "can now push EXISTS and IN subqueries to the > > remote server" is confusing. > > > > What am I missing? > > Read: > > > https://www.postgresql.org/docs/current/postgres-fdw.html#POSTGRES-FDW-RE= MOTE-QUERY-OPTIMIZATION > > F.36.5. Remote Query Optimization > > > As to the change in the Release Note see the --hackers discussion: > > > https://www.postgresql.org/message-id/c9e2a757cf3ac2333714eaf83a9cc184%40= postgrespro.ru > > > > > Regards, > > Koen De Groote > > -- > Adrian Klaver > adrian.klaver@aklaver.com > > --000000000000a3be6906244bd29e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ah, thanks for that

On Fri, Oct 11, 2024 at 5:59=E2=80= =AFPM Adrian Klaver <adrian= .klaver@aklaver.com> wrote:
On 10/11/24 04:08, Koen De Groote wrote:
> In the release notes for postgres 17 I'm reading:
>
>=C2=A0 > The PostgreSQL foreign data wrapper (postgres_fdw), used to= execute
> queries on remote PostgreSQL instances, can now push EXISTS and IN > subqueries to the remote server for more efficient processing.
>
> I'm confused as to what this means. In older versions, are parts o= f
> queries not sent to the foreign server? Or is this change meant to imp= ly
> the sending of only the subqueries, the result of which is then direct= ly
> used in pushing the entire query?
>
> Or am I still wrong as to what this means?
>
> I looked at the documentation and there doesn't seem to be any > indication of particular queries not being pushed to the foreign serve= r,
> so this wording that "can now push EXISTS and IN subqueries to th= e
> remote server" is confusing.
>
> What am I missing?

Read:

http= s://www.postgresql.org/docs/current/postgres-fdw.html#POSTGRES-FDW-REMOTE-Q= UERY-OPTIMIZATION

F.36.5. Remote Query Optimization


As to the change in the Release Note see the --hackers discussion:

https://www.p= ostgresql.org/message-id/c9e2a757cf3ac2333714eaf83a9cc184%40postgrespro.ru<= /a>

>
> Regards,
> Koen De Groote

--
Adrian Klaver
adrian.klave= r@aklaver.com

--000000000000a3be6906244bd29e--