Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dQPCz-0008DN-49 for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jun 2017 02:29:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dQPCy-0002oh-6L for pgsql-hackers@arkaria.postgresql.org; Thu, 29 Jun 2017 02:29:28 +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 1dQPBS-00006H-46 for pgsql-hackers@postgresql.org; Thu, 29 Jun 2017 02:27:54 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dQPBP-0003uK-OP for pgsql-hackers@postgresql.org; Thu, 29 Jun 2017 02:27:52 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v5T2RjZc024358; Wed, 28 Jun 2017 22:27:45 -0400 From: Tom Lane To: Craig Ringer cc: Robert Haas , Peter Eisentraut , Magnus Hagander , PostgreSQL-development Subject: Re: protocol version negotiation (Re: Libpq PGRES_COPY_BOTH - version compatibility) In-reply-to: References: <30788.1498672033@sss.pgh.pa.us> Comments: In-reply-to Craig Ringer message dated "Thu, 29 Jun 2017 09:44:44 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <24356.1498703265.1@sss.pgh.pa.us> Date: Wed, 28 Jun 2017 22:27:45 -0400 Message-ID: <24357.1498703265@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Craig Ringer writes: > On 29 June 2017 at 03:01, Robert Haas wrote: >> It wouldn't be >> so bad if unrecognized parameters were just ignored; the client would >> know from the ServerProtocolVersion (or ParameterStatus) message that >> server had ignored those options and could respond as it saw fit. > Yeah. In retrospect it's a pity the key/value pairs don't come with > some kind of optional/required flag so the client can say "error if > you don't understand this, it's important" or "I don't care if you > don't understand this, and I'll notice when you fail to GUC_REPORT it > back to me". Or some convention like underscore-prefixing for > optional. Yeah. Back in the day I helped design the PNG image format, and one of the better ideas in it was to make a distinction between critical and noncritical chunks within a PNG file; that was exactly the idea you're getting at here. I agree with the suggestion to drive this off a parameter-name-based convention. Having leading underscore indicate a noncritical parameter sounds fine. I don't really like any of the ideas that have been mentioned that would introduce extra network round trips into session startup. It's expensive enough already. The only thing we seem to be really hurting on is the ability for the client to add extensions to the original StartupMessage, and this seems like it can fix that. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers