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 1lwLJz-00035Q-Rs for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Jun 2021 09:06:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lwLJy-0007rg-Hb for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Jun 2021 09:06:50 +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 1lwLJy-0007rY-9z for pgsql-hackers@lists.postgresql.org; Thu, 24 Jun 2021 09:06:50 +0000 Received: from codesynthesis.com ([188.40.148.39]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lwLJw-0007sx-A7 for pgsql-hackers@lists.postgresql.org; Thu, 24 Jun 2021 09:06:49 +0000 Received: from brak.codesynthesis.com (unknown [105.225.47.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by codesynthesis.com (Postfix) with ESMTPSA id 258B95FB23; Thu, 24 Jun 2021 09:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codesynthesis.com; s=mail1; t=1624525606; bh=/JcKoE6IhMltMAXr0E9jfESOLdXRk1cpwD8caG36Nx8=; h=Date:From:To:Subject:Message-ID:MIME-Version:From; b=ODIb54HoQoyXkFcOtaueod8eGd+p6mY3X+GiBhzkvKMBRA4ck0cuXDwFtF6tJ8j9w sbTECzbW0np1ebJxueT1Hpkh1Mvu5Qb/v1Qjil8HQw94Oo1+vyp4bbgRV/N/pW5gwk OxjVGqAZ1s+bl3k5b3jT7QzIGo0qLPaHgHoPFH0C91B3kLMkSC8K5jXFdAd5OlwLoJ Y1acCSXeAApdIe6VNqaB/uyQQBU1wXLbrc4ChNc5Qlpva1bPbSG49UHh8HV83MZTnH N1r0mtIfGIBoJUiy4JPIXP3+iQjnKayaeFDWU37KSZjHjEDiH+AkVfyp/305dak4Vo yKYUg4R9fIaAA== Received: by brak.codesynthesis.com (Postfix, from userid 1000) id 069CC1A802C0; Thu, 24 Jun 2021 11:06:42 +0200 (SAST) Date: Thu, 24 Jun 2021 11:06:42 +0200 From: Boris Kolpackov To: Alvaro Herrera Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Pipeline mode and PQpipelineSync() Message-ID: References: <202106231622.ppuztv2vegix@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106231622.ppuztv2vegix@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: > Curious -- I just noticed that the server understands a message 'H' that > requests a flush of the server buffer. However, libpq has no way to > generate that message as far as I can see. I think you could use that > to request results from the pipeline, without the sync point. > > I wonder if it's worth adding an entry point to libpq to allow access to > this. Yes, I think this can be useful. For example, an application may wish to receive the result as soon as possible in case it's used as input to some further computation. > PQrequestFlush() or something like that ... I think I would prefer PQflushResult() or something along these lines ("request" is easy to misinterpret as "client request").