Re: libpq debug log - Mailing list pgsql-hackers

From 'alvherre@alvh.no-ip.org'
Subject Re: libpq debug log
Date
Msg-id 20210401161041.GA10892@alvherre.pgsql
Whole thread Raw
In response to Re: libpq debug log  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: libpq debug log  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 2021-Apr-01, Tom Lane wrote:

> BTW, what in the world is this supposed to accomplish?
> 
> -                        (long long) rows_to_send);
> +                        (1L << 62) + (long long) rows_to_send);
> 
> Various buildfarm members are complaining that the shift distance
> is more than the width of "long", which I'd just fix with s/L/LL/
> except that the addition of the constant seems just wrong to
> begin with.

It makes the text representation wider, which means some buffer fills up
faster and the program switches from sending to receiving.

-- 
Álvaro Herrera       Valdivia, Chile
"Ni aún el genio muy grande llegaría muy lejos
si tuviera que sacarlo todo de su propio interior" (Goethe)



pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: truncating timestamps on arbitrary intervals
Next
From: Bharath Rupireddy
Date:
Subject: Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit