Re: pgsql: Improve performance of SendRowDescriptionMessage.

From: Andres Freund <andres(at)anarazel(dot)de>
To: Noah Misch <noah(at)leadboat(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Improve performance of SendRowDescriptionMessage.
Date: 2017-10-13 07:39:14
Message-ID: 20171013073914.2te4tfm4abn2q3be@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Hi,

On 2017-10-13 00:02:47 -0700, Noah Misch wrote:
> I hacked psql to call PQtrace() and ran "psql -Xc 'select true'" in the
> defective configuration and in a working x64 GNU/Linux configuration. I've
> attached both PQtrace() products.

Thanks!

> To backend> Msg Q
> To backend> "select true"
> To backend> Msg complete, length 17
> From backend> T
> From backend (#4)> 17
> From backend (#2)> 1
> From backend> "bool"
> From backend (#4)> 1
> From backend (#2)> 0
> From backend (#4)> 1140850688
> From backend (#2)> 2816
> From backend (#4)> 16777216
> From backend (#2)> 372
> From backend> D
> From backend (#4)> 11
> From backend> C
> From backend (#4)> 13
> From backend> "SELECT 1"
> From backend> Z
> From backend (#4)> 5
> From backend> Z
> From backend (#4)> 5
> From backend> I
> To backend> Msg X
> To backend> Msg complete, length 5

> To backend> Msg Q
> To backend> "select true"
> To backend> Msg complete, length 17
> From backend> T
> From backend (#4)> 29
> From backend (#2)> 1
> From backend> "bool"
> From backend (#4)> 0
> From backend (#2)> 0
> From backend (#4)> 16
> From backend (#2)> 1
> From backend (#4)> -1
> From backend (#2)> 0
> From backend> D
> From backend (#4)> 11
> From backend (#2)> 1
> From backend (#4)> 1
> From backend (1)> t
> From backend> C
> From backend (#4)> 13
> From backend> "SELECT 1"
> From backend> Z
> From backend (#4)> 5
> From backend> Z
> From backend (#4)> 5
> From backend> I
> To backend> Msg X
> To backend> Msg complete, length 5

That's certainly quite weird. I can't immediately pinpoint where the bug
is. I initially thought that the StringInfo's lengths might be wrong,
but that doesn'tqutie seem to make sense. Looks a bit like there's just
garbless mess in there... Will have another look when I don't have to
force my eyes to stay open.

Greetings,

Andres Freund

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2017-10-13 11:54:26 Re: [COMMITTERS] pgsql: Fix traversal of half-frozen update chains
Previous Message Andres Freund 2017-10-13 07:32:43 Re: pgsql: Improve performance of SendRowDescriptionMessage.

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2017-10-13 07:43:45 Re: Partition-wise aggregation/grouping
Previous Message Andres Freund 2017-10-13 07:32:43 Re: pgsql: Improve performance of SendRowDescriptionMessage.