Re: Question about WalSndWriteData - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Question about WalSndWriteData
Date
Msg-id fbac36bc-d0ab-e1b4-f798-663040c0b604@2ndquadrant.com
Whole thread Raw
In response to Question about WalSndWriteData  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
Responses Re: Question about WalSndWriteData  (Konstantin Knizhnik <k.knizhnik@postgrespro.ru>)
List pgsql-hackers
On 3/16/18 12:08, Konstantin Knizhnik wrote:
> pq_putmessage_noblock copies data from ctx->out buffer to libpq buffers.
> After it we write timestamp to ctx->out buffer.
> And comments says that we should do it "as late as possible".
> But this timestamp is not included in the copy data packet which is 
> already copied to libpq connection buffer.

There is a pq_flush_if_writable() right after this that will write out
the rest of ctx->out.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: JIT compiling with LLVM v12.2
Next
From: Kefan Yang
Date:
Subject: Re: [GSoC 2018] Proposal Draft