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 1lw0fv-0002kv-5N for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 11:04:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lw0ft-0004T8-UU for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jun 2021 11:04:05 +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 1lw0ft-0004T0-JZ for pgsql-hackers@lists.postgresql.org; Wed, 23 Jun 2021 11:04:05 +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 1lw0fo-00064W-Ji for pgsql-hackers@lists.postgresql.org; Wed, 23 Jun 2021 11:04:04 +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 196215F301; Wed, 23 Jun 2021 11:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codesynthesis.com; s=mail1; t=1624446237; bh=Z8QOaJRbnbgVJYakQ53ytXk7Wq5AUcjRPlwQVfJVWOk=; h=Date:From:To:Subject:Message-ID:MIME-Version:From; b=yXxlQMx7yIhr6QIjxFjEsU1H2yIuSO5DNOG7E0oOrtB1I18WTm9jQ+cJrUmKlakZm 1mG8FkcGGIXYYsFN9KElrSKc+Krfm0DSdcjcdsZoSDyzvzGqH170Pik2h7Rf3kXv1Z AMauhXRgNZ2LsUr/PGUNAjANafL7rblc8HNLtsLj3sMbLt3r+IHV0wW+v4kKpu6m+y LUryHy+cqWPzv0aRiSXFNjnrnNhyzkIHVcL6NawaUJi60gnEYTUkD0tPCZI3sEbmKc qMFe+igQDY3Y4Icfv491AtUJt8Eba3CFpZFz150JzLByAJHz61/snNJ5pLmBUH8a+z tSCu/56R1EvXg== Received: by brak.codesynthesis.com (Postfix, from userid 1000) id 725D21A802C0; Wed, 23 Jun 2021 13:03:52 +0200 (SAST) Date: Wed, 23 Jun 2021 13:03:52 +0200 From: Boris Kolpackov To: Alvaro Herrera Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Pipeline mode and PQpipelineSync() Message-ID: References: <202106222214.ptjfmstb23mu@alvherre.pgsql> <202106230034.w5e33heifbud@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106230034.w5e33heifbud@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: > On 2021-Jun-22, Alvaro Herrera wrote: > > > > So I think it would be useful to clarify the server behavior and > > > specify it in the documentation. > > > > I'll see about improving the docs on these points. > > So I started to modify the second paragraph to indicate that the client > would send data on PQflush/buffer full/PQpipelineSync, only to realize > that the first paragraph already explains this. So I'm not sure if any > changes are needed. > > Maybe your complaint is only based on disagreement about what does libpq > do regarding queueing commands; and as far as I can tell in quick > experimentation with libpq, it works as the docs state already. I think one change that is definitely needed is to make it clear that the PQpipelineSync() call is not optional. I would also add a note saying that while the server starts processing the pipeline immediately, it may buffer the results and the only way to flush them out is to call PQpipelineSync().