Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUfAx-0004fR-Sq for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Dec 2017 20:53:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eUfAx-00037k-3G for pgsql-bugs@arkaria.postgresql.org; Thu, 28 Dec 2017 20:53:15 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eUfAw-00037a-H6 for pgsql-bugs@lists.postgresql.org; Thu, 28 Dec 2017 20:53:14 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1eUfAt-00087m-Ng for pgsql-bugs@postgresql.org; Thu, 28 Dec 2017 20:53:13 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 86F7E21914; Thu, 28 Dec 2017 15:53:10 -0500 (EST) Received: from web5 ([10.202.2.215]) by compute5.internal (MEProxy); Thu, 28 Dec 2017 15:53:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=s1devops.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=RjIyudmUWA2J/kjG0jnw/JZBbD WGDrU3SOTvBuFBTVE=; b=TiczFnfw/h0nhY3m4RS7vfZ7Fte6UrjZTRpDJWrnNs IxrMLtfLGjBy6srOz0quwYjvLF6/I2+0QgDmus6XNjVhk+gLfFKbx7MTCoTynFhj KBNfGYApPzvBv+qrNBldp39iXtNm/ppTaHjz6UPTBZW6Qk+rU0GH4Y5mEBXYCIi4 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=RjIyud mUWA2J/kjG0jnw/JZBbDWGDrU3SOTvBuFBTVE=; b=j94tyqsnI509RGTiBJe/iv oQN1cKCflra676FZMnC9HMoXaFUNjig4A+yK8TD661V3fVIO5TkxGuspj+XMhJoW xGez3GRDXlwe2l60CHnZtajrdeeaU3oHb2yS9JKrHmWTCIC3Yaj4R87ctM8QG2cF 0U41lPfj79VrJG+FfEoV6BTSQKAgyjjeJOF3cew2g6IHWiDAAygmdLeyRHvdHgyA F3zKa1AcMsFHWpV7Vjnt4An5Nb5iDZiiZ+TtVP7lLgcZP6kUUZp7ypYzb/wN1r/t rkPT8dDsAvzAO4QtY6S/e8QiVeoU5Z0bnDCC2AmjugM5iEo9/8NpmzTCuIakvVxA == X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 455929E20D; Thu, 28 Dec 2017 15:53:10 -0500 (EST) Message-Id: <1514494390.1823031.1218199032.1A9DAB6C@webmail.messagingengine.com> From: Logan Owen To: Jeff Janes Cc: Pg Bugs MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-bb99f02b References: <1514493194.1816836.1218184760.614638F8@webmail.messagingengine.com> Date: Thu, 28 Dec 2017 15:53:10 -0500 Subject: Re: Server postgres_fdw "fetch_size" option cannot be updated In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Dec 28, 2017, at 15:42, Jeff Janes wrote: > On Thu, Dec 28, 2017 at 12:33 PM, Logan Owen wrote: >> Hi everyone, >>=20=20 >> I'm playing around with postgres_fdw (version 1.0), and ran into an iss= ue where I wanted to update the "fetch_size" option on the server level: >>=20=20 >> sql> CREATE SERVER test_remote FOREIGN DATA WRAPPER postgres_fdw OPTION= S (host 'postgres2', dbname 'test', updatable 'false') >> [2017-12-28 10:30:13] completed in 35ms >> sql> ALTER SERVER test_remote OPTIONS (set fetch_size '50') >> [2017-12-28 10:30:26] [42704] ERROR: option "fetch_size" not found >>=20=20 >> However, I am able to properly set the "fetch_size" when originally def= ining the server: >>=20=20 >> sql> CREATE SERVER test_remote2 FOREIGN DATA WRAPPER postgres_fdw OPTIO= NS (host 'postgres2', dbname 'test', updatable 'false', fetch_size '50') >> [2017-12-28 10:31:26] completed in 24ms >>=20=20 > =C2=A0 > You use 'set' only if a value already exists and you wish to change it.= =C2=A0 Since no value exists (the default does not count), you just do >=20 > ALTER SERVER test_remote OPTIONS (fetch_size '50'); >=20 > Yes, this is confusing.=C2=A0 But it is also documented, and I think it i= s required by the SQL/MED standard. >=20 > Cheers, >=20 > Jeff Hi Jeff, Thank you for quick reply, and you are right, it is referenced in the docum= entation for ALTER SERVER (https://www.postgresql.org/docs/9.6/static/sql-a= lterserver.html): > Change options for the server. ADD, SET, and DROP specify the action to b= e performed. ADD is assumed if no operation is explicitly specified. Option= names must be unique; names and values are also validated using the server= 's foreign-data wrapper library. My apologies for not being more thorough before assuming an issue, and have= a great day! Logan