Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
On 2017-10-13 14:19:22 -0400, Tom Lane wrote: > > So it'd probably better to introduce a FORCE_DISABLE_RESTRICT=yes, set > > at the same place, that's then tested before running the relevant > > configure check? > > +1. I think you don't actually have to skip the configure check, > and there

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Tom Lane
Andres Freund writes: > A easiest way to do this would be to put something like > CPPFLAGS="$CPPFLAGS -Dpg_restrict" into the existing > if test "$GCC" != yes ; then > block in a/src/template/linux. But that'd probably result in "macro > redefined" warnings or somesuch. You

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
On 2017-10-13 13:48:07 -0400, Tom Lane wrote: > I wrote: > > Anyway, I will go make the sizeof() usages consistent, just to satisfy > > my own uncontrollable neatnik-ism. Assuming that hornet stays red, > > which is probable, we should disable "restrict" for that compiler. > > As expected, that

Re: [HACKERS] [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Tom Lane
I wrote: > Anyway, I will go make the sizeof() usages consistent, just to satisfy > my own uncontrollable neatnik-ism. Assuming that hornet stays red, > which is probable, we should disable "restrict" for that compiler. As expected, that didn't fix it. Andres, are you going to put in a disable?

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Tom Lane
Noah Misch writes: > 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. It looks to me like the xlc build simply forgets to send some

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
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

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Andres Freund
On 2017-10-12 19:35:36 -0700, Noah Misch wrote: > On Thu, Oct 12, 2017 at 04:08:44PM -0700, Andres Freund wrote: > > So we've two animals (hornet, sungazer) that are: > > #define SIZEOF_SIZE_T 8 > > #define WORDS_BIGENDIAN 1 > > #define restrict __restrict > > > > one compiled with xlc that fails

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-13 Thread Noah Misch
In an earlier message, I said I didn't see the problem with xlc 13.1.3. I withdraw that statement. I had tested old code (commit c629324, 20 Aug), rendering the test invalid. xlc 13.1.3 does break commit 91d5f1a, and removing "restrict" fixes things as it did the older version. On Thu, Oct 12,

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Tom Lane
Noah Misch writes: > On Thu, Oct 12, 2017 at 04:08:44PM -0700, Andres Freund wrote: >> Noah, any chance you could force restrict to off on that animal? > I can confirm it allows "make check" to pass. So that leaves us with two theories: 1. hornet's compiler contains a bug

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Noah Misch
On Thu, Oct 12, 2017 at 04:48:29PM -0700, Andres Freund wrote: > On 2017-10-12 16:08:44 -0700, Andres Freund wrote: > > wrap-gcc -D_THREAD_SAFE=1 -D_LARGE_FILES=1 -maix64 -Wall > > -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement > > -Wendif-labels -Wmissing-format-attribute

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Noah Misch
On Thu, Oct 12, 2017 at 04:08:44PM -0700, Andres Freund wrote: > So we've two animals (hornet, sungazer) that are: > #define SIZEOF_SIZE_T 8 > #define WORDS_BIGENDIAN 1 > #define restrict __restrict > > one compiled with xlc that fails and one with gcc that succeeds. I'm > hesitant to reach for

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Tom Lane
Andres Freund writes: > On 2017-10-12 20:06:32 -0400, Tom Lane wrote: >> Nope, because that's quite old. > Right. I'd mentioned that it's *not* that commit, even though it > initially looked suspicious. Right, my point was that nothing else we'd changed recently broke this

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 20:06:32 -0400, Tom Lane wrote: > Andres Freund writes: > >> fe-connect.c:2382:6: warning: implicit declaration of function > >> 'getpeereid' [-Wimplicit-function-declaration] > >> Looks like we're missing > >> #include > > > Hm, it got removed as part of > >

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Tom Lane
Andres Freund writes: >> fe-connect.c:2382:6: warning: implicit declaration of function 'getpeereid' >> [-Wimplicit-function-declaration] >> Looks like we're missing >> #include > Hm, it got removed as part of >

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 16:08:44 -0700, Andres Freund wrote: > wrap-gcc -D_THREAD_SAFE=1 -D_LARGE_FILES=1 -maix64 -Wall -Wmissing-prototypes > -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels > -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv >

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Andres Freund
On 2017-10-12 10:44:58 -0400, Tom Lane wrote: > Andres Freund writes: > > Improve performance of SendRowDescriptionMessage. > > One or another of these patches has broken buildfarm member hornet. > Apparently, it's transmitting incorrectly-formatted RowDescription > messages.

Re: [COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-12 Thread Tom Lane
Andres Freund writes: > Improve performance of SendRowDescriptionMessage. One or another of these patches has broken buildfarm member hornet. Apparently, it's transmitting incorrectly-formatted RowDescription messages. regards, tom lane -- Sent via

[COMMITTERS] pgsql: Improve performance of SendRowDescriptionMessage.

2017-10-11 Thread Andres Freund
Improve performance of SendRowDescriptionMessage. There's three categories of changes leading to better performance: - Splitting the per-attribute part of SendRowDescriptionMessage into a v2 and a v3 version allows avoiding branches for every attribute. - Preallocating the size of the buffer to