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 1qlrNC-004e21-QG for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Sep 2023 13:48:10 +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 1qlrNB-00DF1D-De for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Sep 2023 13:48:09 +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 1qlrNB-00DF0u-0f for pgsql-bugs@lists.postgresql.org; Thu, 28 Sep 2023 13:48:09 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qlrN7-0086PC-Oo for pgsql-bugs@lists.postgresql.org; Thu, 28 Sep 2023 13:48:08 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=cqmM6rxT6IoU1BnSOxhh0GUDb8trljVFtpPkkS4bHIw=; b=aDtU4 cQgAP7zhP0PDHDJt6tLMNZPg5GGKZSbuZxz70INIEwJIxCo0y+T5FwWVQJ/UEB4Z9gMeToqUzJ+CC rTWe3D6dL1dEQYGrmEM5rJ4WKKMRjNozbvernFrpDXoYV+pZXDGRfuwjujVZFj+DaMAxCKbdN7/pi AMT9INgVzdxdJ3cM/qR2xGRinaIaT9AiKuncf2zPpF9fcGz8+TroV/0Ccwmpf6uYx7XFO/CbxyLT6 402eGPov4QiN/r38RP0xhAmPXfy9b7H6/m1E5fBt8oXizVXUvxOEcHKrAFq3EwH6FbSva4OpBQeCJ /xeWodVybCosGQumV/y+zv86MvP2g==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qlrN4-00AHfv-0T; Thu, 28 Sep 2023 09:48:02 -0400 Date: Thu, 28 Sep 2023 09:48:02 -0400 From: Bruce Momjian To: Tom Lane Cc: Pete Storer , "pgsql-bugs@lists.postgresql.org" Subject: Re: FW: Query execution failure Message-ID: References: <2957101.1674746628@sss.pgh.pa.us> <2961799.1674749201@sss.pgh.pa.us> <802119.1695863173@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BVVrYYVpq+6+pvXT" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --BVVrYYVpq+6+pvXT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Sep 27, 2023 at 10:27:34PM -0400, Bruce Momjian wrote: > On Wed, Sep 27, 2023 at 09:06:13PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > The attached patch documents this remote sort order requirement. > > > > That seems like quite a random place to insert the documentation. > > I doubt that the requirement applies only to upper paths -- FDWs > > are allowed to return sorted paths for base relations too, > > comparable to indexscan paths. > > That is the only section of the docs that mentions sort pushdown. > I don't see another reasonable location. I now think the fdw docs are the wrong place for this since it is a user requirement, not a developer one. I put it in CREATE SERVER, patch attached. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you. --BVVrYYVpq+6+pvXT Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="fdw.diff" diff --git a/doc/src/sgml/ref/create_server.sgml b/doc/src/sgml/ref/create_server.sgml index af0a7a06fd..05f4019453 100644 --- a/doc/src/sgml/ref/create_server.sgml +++ b/doc/src/sgml/ref/create_server.sgml @@ -129,6 +129,11 @@ CREATE SERVER [ IF NOT EXISTS ] server_nameUSAGE privilege on the foreign server to be able to use it in this way. + + + If the foreign server supports sort pushdown, it is necessary for it + to have the same sort ordering as the local server. + --BVVrYYVpq+6+pvXT--