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 1lxqou-0005z9-Rm for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jun 2021 12:57:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lxqot-000529-R0 for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Jun 2021 12:56:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxqot-00051z-Cl for pgsql-hackers@lists.postgresql.org; Mon, 28 Jun 2021 12:56:59 +0000 Received: from codesynthesis.com ([188.40.148.39]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxqon-0004Zl-2B for pgsql-hackers@lists.postgresql.org; Mon, 28 Jun 2021 12:56:58 +0000 Received: from brak.codesynthesis.com (unknown [105.184.82.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by codesynthesis.com (Postfix) with ESMTPSA id D6F765FB23; Mon, 28 Jun 2021 12:56:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codesynthesis.com; s=mail1; t=1624885010; bh=6IaUBT3LHR5uYUMtOxb34+kM7yel61enACUmssi+UCI=; h=Date:From:To:Subject:Message-ID:MIME-Version:From; b=jfLRUf0MCvbPPgjNjOm5OG3fa8ClAuhqeqs04L1AgIA0xtzhlCncm+8Ksqv/xLJqT uPzaX1fGeOilv5WRqH4Sq/74nOXoPYin5bKiFLp9btaKOaPumC7RDcPOFyQMmkfg7p CzJFwmH6kkMFPrBpxCwLn61L5Tijwk9nhCQFB6UX5etiCGWw9cOiHv3fmyjVE/4crT qUhZbXSQ64JikLLAhmlIFsyMArDm1mH22K3pzvTBiWQHYdxFzGwItQIIN2n8qioj8K mqu4SdfKEYfBqeWd5VRRvqyPc9uKvE8fpRBDTDmaH10BAODVeklbMzTw7wTi3Fkn41 DChilhCTHDwiQ== Received: by brak.codesynthesis.com (Postfix, from userid 1000) id B274B1A802C0; Mon, 28 Jun 2021 14:56:43 +0200 (SAST) Date: Mon, 28 Jun 2021 14:56:43 +0200 From: Boris Kolpackov To: Alvaro Herrera Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Pipeline mode and PQpipelineSync() Message-ID: References: <202106252350.t76x73nt643j@alvherre.pgsql> <202106252352.5ca4byasfun5@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106252352.5ca4byasfun5@alvherre.pgsql> Organization: Code Synthesis User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Alvaro Herrera writes: > I forgot to mention: > > > + /* XXX useless without a flush ...? */ > > + pqFlush(conn); > > + > > + return 1; > > +} > > I'm not sure if it's a good idea for PQrequestFlush to itself flush > libpq's buffer. We can just document that PQflush is required ... > opinions? Yes, I think not calling PQflush() gives more flexibility. For example, an application may "insert" them periodically after a certain number of queries but call PQflush() at different intervals.