Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khgCX-0003kT-Iv for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Nov 2020 21:50:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1khgBz-000751-L8 for pgsql-hackers@arkaria.postgresql.org; Tue, 24 Nov 2020 21:49:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khgBz-00074t-EE for pgsql-hackers@lists.postgresql.org; Tue, 24 Nov 2020 21:49:43 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1khgBw-0005Vl-9X for pgsql-hackers@postgresql.org; Tue, 24 Nov 2020 21:49:42 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0AOLnJwQ311788; Tue, 24 Nov 2020 16:49:20 -0500 From: Tom Lane To: Anastasia Lubennikova cc: Greg Nancarrow , Peter Smith , "Smith, Peter" , David Steele , "Tsunakawa, Takayuki" , Alvaro Herrera , Haribabu Kommi , Robert Haas , Laurenz Albe , Dave Cramer , Jing Wang , PostgreSQL-development , Elvis Pranskevichus Subject: Re: Libpq support to connect to standby server as priority In-reply-to: <91749879-e086-02db-a4dd-44d49f0332b2@postgrespro.ru> References: <20200228160535.GA32597@alvherre.pgsql> <4769B138-389C-436A-A025-3CA3468ECD16@yesql.se> <87EDE4DB-B82B-43EB-A349-EED4643F3C1D@yesql.se> <9a795e59e0834b13bf8054107a491e57@G06AUEXCASMHB04.g06.fujitsu.local> <1947363.1601071129@sss.pgh.pa.us> <5708.1601145259@sss.pgh.pa.us> <91749879-e086-02db-a4dd-44d49f0332b2@postgrespro.ru> Comments: In-reply-to Anastasia Lubennikova message dated "Tue, 24 Nov 2020 15:26:08 +0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <311786.1606254559.1@sss.pgh.pa.us> Date: Tue, 24 Nov 2020 16:49:19 -0500 Message-ID: <311787.1606254559@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Anastasia Lubennikova writes: > Hi, this entry is "Waiting on Author" and the thread was inactive for a > while. As far as I see, the patch needs some further work. > Are you going to continue working on it, or should I mark it as > "returned with feedback" until a better time? I'm inclined to go ahead and commit the 0001 patch I posted at [1] (ie, change the implementation of GUC_REPORT to avoid intra-query reports), since that addresses a performance problem that's independent of the goal here. The rest of this seems to still be in Greg's court. Has anyone got an opinion about the further improvement I suggested: >> As it stands, 0001 reduces the ParameterStatus message traffic to >> at most one per GUC per query, but it doesn't attempt to eliminate >> duplicate ParameterStatus messages altogether. We could do that >> as a pretty simple adjustment if we're willing to expend the storage >> to remember the last value sent to the client. It might be worth >> doing, since for example the function-SET-clause case would typically >> lead to no net change in the GUC's value by the end of the query. On reflection this seems worth doing, since excess client traffic is far from free. regards, tom lane [1] https://www.postgresql.org/message-id/5708.1601145259%40sss.pgh.pa.us