Re: Question about WalSndWriteData

2018-03-29 Thread Kyotaro HORIGUCHI
Hello, At Thu, 29 Mar 2018 20:11:03 +0300, Konstantin Knizhnik wrote in <04171363-a07d-62b7-4362-32de54149...@postgrespro.ru> > > > On 21.03.2018 10:08, Konstantin Knizhnik wrote: > > > > > > On 21.03.2018 04:50, Peter Eisentraut wrote: > >> On 3/16/18 12:08,

Re: Question about WalSndWriteData

2018-03-29 Thread Konstantin Knizhnik
On 21.03.2018 10:08, Konstantin Knizhnik wrote: On 21.03.2018 04:50, Peter Eisentraut wrote: 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

Re: Question about WalSndWriteData

2018-03-21 Thread Konstantin Knizhnik
On 21.03.2018 04:50, Peter Eisentraut wrote: 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

Re: Question about WalSndWriteData

2018-03-20 Thread Peter Eisentraut
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

Question about WalSndWriteData

2018-03-16 Thread Konstantin Knizhnik
Hi hackes, I confused by the following code in WalSndWriteData:     /* output previously gathered data in a CopyData packet */     pq_putmessage_noblock('d', ctx->out->data, ctx->out->len);     /*      * Fill the send timestamp last, so that it is taken as late as possible.      * This is