Thread
Commits
-
Call pqPipelineFlush from PQsendFlushRequest
- 99fa98766fa5 14.11 landed
- 42f8326851fd 16.2 landed
- 1a5594b95762 17.0 landed
- 0e28091d5507 15.6 landed
-
Call pqPipelineFlush from PQsendFlushRequest
Jelte Fennema-Nio <postgres@jeltef.nl> — 2023-11-07T09:38:04Z
In pipeline mode after queuing a message to be sent we would flush the buffer if the size of the buffer passed some threshold. The only message type that we didn't do that for was the Flush message. This addresses that oversight. I noticed this discrepancy while reviewing the PQsendSyncMessage/PQpipelinePutSync patchset.
-
Re: Call pqPipelineFlush from PQsendFlushRequest
Michael Paquier <michael@paquier.xyz> — 2023-11-07T11:24:21Z
On Tue, Nov 07, 2023 at 10:38:04AM +0100, Jelte Fennema-Nio wrote: > In pipeline mode after queuing a message to be sent we would flush the > buffer if the size of the buffer passed some threshold. The only message > type that we didn't do that for was the Flush message. This addresses > that oversight. > > I noticed this discrepancy while reviewing the > PQsendSyncMessage/PQpipelinePutSync patchset. Indeed, it looks a bit strange that there is no flush if the buffer threshold is reached once the message is sent, so your suggestion sounds right. Alvaro? -- Michael
-
Re: Call pqPipelineFlush from PQsendFlushRequest
Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-11-07T11:43:18Z
On 2023-Nov-07, Michael Paquier wrote: > On Tue, Nov 07, 2023 at 10:38:04AM +0100, Jelte Fennema-Nio wrote: > > In pipeline mode after queuing a message to be sent we would flush the > > buffer if the size of the buffer passed some threshold. The only message > > type that we didn't do that for was the Flush message. This addresses > > that oversight. > > > > I noticed this discrepancy while reviewing the > > PQsendSyncMessage/PQpipelinePutSync patchset. > > Indeed, it looks a bit strange that there is no flush if the buffer > threshold is reached once the message is sent, so your suggestion > sounds right. Alvaro? I agree, and I intend to get this patch pushed once the release freeze is lifted. -- Álvaro Herrera Breisgau, Deutschland — https://www.EnterpriseDB.com/ "The Gord often wonders why people threaten never to come back after they've been told never to return" (www.actsofgord.com)
-
Re: Call pqPipelineFlush from PQsendFlushRequest
Michael Paquier <michael@paquier.xyz> — 2023-11-08T00:35:41Z
On Tue, Nov 07, 2023 at 12:43:18PM +0100, Alvaro Herrera wrote: > I agree, and I intend to get this patch pushed once the release freeze > is lifted. Thanks! -- Michael
-
Re: Call pqPipelineFlush from PQsendFlushRequest
Alvaro Herrera <alvherre@alvh.no-ip.org> — 2023-11-08T16:10:27Z
On 2023-Nov-07, Michael Paquier wrote: > On Tue, Nov 07, 2023 at 10:38:04AM +0100, Jelte Fennema-Nio wrote: > > In pipeline mode after queuing a message to be sent we would flush the > > buffer if the size of the buffer passed some threshold. The only message > > type that we didn't do that for was the Flush message. This addresses > > that oversight. > > > > I noticed this discrepancy while reviewing the > > PQsendSyncMessage/PQpipelinePutSync patchset. > > Indeed, it looks a bit strange that there is no flush if the buffer > threshold is reached once the message is sent, so your suggestion > sounds right. Alvaro? Pushed, thanks. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "Porque Kim no hacía nada, pero, eso sí, con extraordinario éxito" ("Kim", Kipling) -
Re: Call pqPipelineFlush from PQsendFlushRequest
Tom Lane <tgl@sss.pgh.pa.us> — 2024-02-01T20:00:42Z
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > On 2023-Nov-07, Michael Paquier wrote: >> Indeed, it looks a bit strange that there is no flush if the buffer >> threshold is reached once the message is sent, so your suggestion >> sounds right. Alvaro? > Pushed, thanks. I observe that this patch did not touch libpq.sgml, which still says Note that the request is not itself flushed to the server automatically; use <function>PQflush</function> if necessary. Doesn't that require some rewording? regards, tom lane -
Re: Call pqPipelineFlush from PQsendFlushRequest
Jelte Fennema-Nio <postgres@jeltef.nl> — 2024-02-01T22:33:49Z
On Thu, 1 Feb 2024 at 21:00, Tom Lane <tgl@sss.pgh.pa.us> wrote: > Note that the request is not itself flushed to the server automatically; > use <function>PQflush</function> if necessary. > > Doesn't that require some rewording? I agree that the current wording is slightly incorrect, but I think I prefer we keep it this way. The fact that we actually DO flush when some internal buffer is filled up seems more like an implementation detail, than behavior that people should actually be depending upon. And even knowing the actual behavior, still the only way to know that your data is flushed is by calling PQflush (since a user has no way of checking if we automatically flushed the internal buffer).