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 1t66yp-00AitV-IP for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Oct 2024 11:35:16 +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 1t66yn-0082pc-DV for pgsql-hackers@arkaria.postgresql.org; Wed, 30 Oct 2024 11:35:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t66yn-0082pU-0l for pgsql-hackers@lists.postgresql.org; Wed, 30 Oct 2024 11:35:13 +0000 Received: from meldrar.postgresql.org ([2a02:c0:301:0:ffff::31]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t66yk-003c6f-An for pgsql-hackers@postgresql.org; Wed, 30 Oct 2024 11:35:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=postgresql.org; s=20171124; h=Content-Transfer-Encoding:Content-Type: Mime-Version:References:In-Reply-To:From:Subject:Cc:To:Message-Id:Date:Sender :Reply-To:Content-ID:Content-Description; bh=I4xa9TmhFNTqIB0LdCNUvs+Zzls75rcdeg7v2ilXakw=; b=F9RGMhsDxKG82nlZsmzm9IWYvM 1YN52xggVtS0/Q5AlHaO1cMB5S8If1Ihvrj4yxoDFDAo2Z5s0+xzIpkwMJyCtdECufAMU6ZXbbMcg nFnuBckFQjGySai71EuuvRTVfPx2pNj5croz1yoUSGZsgGMAWMfFwSxK2RGOe2720TRvYBDR85/6v xYG8dCO06vA80PrPpikWWUwkhxvqNXcpiTzgq8gnVR98j+mJPdYolq7i0ploLhmgEw+XUr5pZjBKY jpWmkoZrHG0V6kT8eq9hb3DictI/qRfJtY7V5bDUqPdkeWDLpzHuPfXKsiU7fTqJ7lqLHUMRTr9+a 4gYIGbgg==; Received: from [2409:11:4120:300:7dff:72d4:a9d9:a98f] (helo=localhost) by meldrar.postgresql.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (Exim 4.94.2) (envelope-from ) id 1t66ye-00E39y-Ve; Wed, 30 Oct 2024 11:35:08 +0000 Date: Wed, 30 Oct 2024 20:34:55 +0900 (JST) Message-Id: <20241030.203455.1272396392870662989.ishii@postgresql.org> To: postgres@jeltef.nl Cc: peter@eisentraut.org, pgsql-hackers@postgresql.org Subject: Re: protocol-level wait-for-LSN From: Tatsuo Ishii In-Reply-To: References: <20241030.154919.859856957033404666.ishii@postgresql.org> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Host-Lookup-Failed: Reverse DNS lookup failed for 2409:11:4120:300:7dff:72d4:a9d9:a98f (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Wed, 30 Oct 2024 at 07:49, Tatsuo Ishii wrote: >> > I think one would have to define that somehow. If it's useful, the >> > additional fields of both extensions could be appended, in some >> > defined order. But this is an interesting question to think about. >> >> I think this kind of extension, which adds new filed to an existing >> message type, should be implemented as v4 protocol. > > Could you explain why you think a major version bump is needed? In > what situation do you care about this. Because for my usecases (client > implementations & pgbouncer) I don't think that would be necessary. If > a client doesn't send the _pq_.wait_for_lsn protocol parameter, it > will never receive this new version. Yes, if there's only one extension for a message type, it would not be a big problem. But if there's more than one extensions that want to change the same type, problem arises as I have already discussed them upthread. > I don't really see a problem with having two protocol parameters > change the same message. Yes, you have to define what the result of > their combination is, but that seems trivial to do for additions of > fields. You either define the first protocol parameter that was added > to the spec, to add its field before the second. Or you could do it > based on something non-time-dependent, like the alphabetic order of > the protocol parameter, or the alphabetic order of the fields that > they add. That sounds far from trivial. So each extension needs to check if any other extension which modifies the same message type is activated? That requires each extension implementation to have built-in knowledge about any conflicting extension. Moreover each extension may not be added at once. If extension Y is added after extension X is defined, then implementation of X needs to be changed because at the time when X is defined, it did not need to care about Y. Another way to deal with the problem could be defining a new protocol message which describes those conflict information so that each extensions do not need to have such information built-in, but maybe it is too complex. Best reagards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp