Re: pgsql: Improve performance of SendRowDescriptionMessage.
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Noah Misch <noah@leadboat.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-committers@postgresql.org
Date: 2017-10-13T07:39:14Z
Lists: 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
Commits
-
Force "restrict" not to be used when compiling with xlc.
- d133982d598c 11.0 landed
-
Rely on sizeof(typename) rather than sizeof(variable) in pqformat.h.
- 5229db6c6f92 11.0 landed
-
Use C99 restrict via pg_restrict, rather than restrict directly.
- 91d5f1a4a3e8 11.0 cited
-
Improve performance of SendRowDescriptionMessage.
- 4c119fbcd49b 11.0 cited
-
Partially flatten struct tupleDesc so that it can be used in DSM.
- c6293249dc17 11.0 cited
-
Remove useless duplicate inclusions of system header files.
- 9e3755ecb2d0 10.0 cited