Re: [HACKERS] Windows warnings from VS 2017

2017-10-17 Thread Andres Freund
On 2017-10-11 18:20:24 -0400, Tom Lane wrote: > Well, it's not that much work to try it and see. I compared results > of this simplistic test case: > pgbench -S -c 1 -T 60 bench > (using a scale-factor-10 pgbench database) on current HEAD and HEAD > with the attached patch, which just loboto

Re: [HACKERS] Windows warnings from VS 2017

2017-10-11 Thread Tom Lane
Andres Freund writes: > Andrew Dunstan writes: >> I presume if you can make that assertion you already have something >> along those lines? > Not really. I just replaced memset with MemSetAligned in a bunch of > places in the code and looked at profiles. Well, it's not that much work to try it

Re: [HACKERS] Windows warnings from VS 2017

2017-10-11 Thread Andres Freund
> On 09/21/2017 09:41 PM, Andres Freund wrote: > > On 2017-09-21 09:30:31 -0400, Tom Lane wrote: > >> Andrew Dunstan writes: > >>> The speed of memset is hardly going to be the dominating factor in a > >>> 'CREATE DATABASE' command, so we could certainly afford to change to > >>> plain memset call

Re: [HACKERS] Windows warnings from VS 2017

2017-09-22 Thread Andrew Dunstan
On 09/21/2017 09:41 PM, Andres Freund wrote: > On 2017-09-21 09:30:31 -0400, Tom Lane wrote: >> Andrew Dunstan writes: >>> The speed of memset is hardly going to be the dominating factor in a >>> 'CREATE DATABASE' command, so we could certainly afford to change to >>> plain memset calls here. >>

Re: [HACKERS] Windows warnings from VS 2017

2017-09-21 Thread Andres Freund
On 2017-09-21 09:30:31 -0400, Tom Lane wrote: > Andrew Dunstan writes: > > The speed of memset is hardly going to be the dominating factor in a > > 'CREATE DATABASE' command, so we could certainly afford to change to > > plain memset calls here. > > Another thought is that it may be time for our

Re: [HACKERS] Windows warnings from VS 2017

2017-09-21 Thread Michael Paquier
On Thu, Sep 21, 2017 at 10:30 PM, Tom Lane wrote: > Another thought is that it may be time for our decennial debate about > whether MemSet is worth the electrons it's printed on. I continue to > think that any modern compiler+libc ought to do an equivalent or better > optimization given just a pl

Re: [HACKERS] Windows warnings from VS 2017

2017-09-21 Thread Tom Lane
Andrew Dunstan writes: > The speed of memset is hardly going to be the dominating factor in a > 'CREATE DATABASE' command, so we could certainly afford to change to > plain memset calls here. Another thought is that it may be time for our decennial debate about whether MemSet is worth the electro

Re: [HACKERS] Windows warnings from VS 2017

2017-09-21 Thread Andrew Dunstan
On 09/21/2017 02:53 AM, Haribabu Kommi wrote: > > > On Thu, Sep 21, 2017 at 12:26 PM, Andrew Dunstan > > wrote: > > > > On 09/20/2017 08:18 PM, Andrew Dunstan wrote: > > > > On 09/20/2017 07:54 PM, Tom Lane wrote: > >> Andrew Dunstan

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Haribabu Kommi
On Thu, Sep 21, 2017 at 12:26 PM, Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > > On 09/20/2017 08:18 PM, Andrew Dunstan wrote: > > > > On 09/20/2017 07:54 PM, Tom Lane wrote: > >> Andrew Dunstan writes: > >>> It's also warning that it will copy 16 bytes to a 13 byte structure at >

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Andrew Dunstan
On 09/20/2017 08:18 PM, Andrew Dunstan wrote: > > On 09/20/2017 07:54 PM, Tom Lane wrote: >> Andrew Dunstan writes: >>> It's also warning that it will copy 16 bytes to a 13 byte structure at >>> lines 518, 1293 and 1294 of src/backend/commands/dbcommands.c. I haven't >>> seen any ill effects of

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Andrew Dunstan
On 09/20/2017 07:54 PM, Tom Lane wrote: > Andrew Dunstan writes: >> It's also warning that it will copy 16 bytes to a 13 byte structure at >> lines 518, 1293 and 1294 of src/backend/commands/dbcommands.c. I haven't >> seen any ill effects of this so far, but it seems to indicate that >> somethin

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Andrew Dunstan
On 09/20/2017 07:32 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 09/20/2017 06:13 PM, Michael Paquier wrote: >>> Those are around for some time, see here: >>> https://www.postgresql.org/message-id/CAB7nPqTkW=b_1jvvywd_g0wrkot+4ufqjggrv8osqbuzzxg...@mail.gmail.com >>> But there has been no

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Tom Lane
Andrew Dunstan writes: > It's also warning that it will copy 16 bytes to a 13 byte structure at > lines 518, 1293 and 1294 of src/backend/commands/dbcommands.c. I haven't > seen any ill effects of this so far, but it seems to indicate that > something is possibly amiss on this compiler with the Me

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Tom Lane
Andrew Dunstan writes: > On 09/20/2017 06:13 PM, Michael Paquier wrote: >> Those are around for some time, see here: >> https://www.postgresql.org/message-id/CAB7nPqTkW=b_1jvvywd_g0wrkot+4ufqjggrv8osqbuzzxg...@mail.gmail.com >> But there has been no actual agreement about how to fix them.. > Oh.

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Michael Paquier
On Thu, Sep 21, 2017 at 7:49 AM, Andrew Dunstan wrote: > On 09/20/2017 06:13 PM, Michael Paquier wrote: >> On Thu, Sep 21, 2017 at 7:08 AM, Andrew Dunstan >> wrote: >>> First, it warns about a couple of unused variables at lines 4553 and >>> 4673 of src/backend/optimizer/path/costsize.c. I think

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Andrew Dunstan
On 09/20/2017 06:13 PM, Michael Paquier wrote: > On Thu, Sep 21, 2017 at 7:08 AM, Andrew Dunstan > wrote: >> First, it warns about a couple of unused variables at lines 4553 and >> 4673 of src/backend/optimizer/path/costsize.c. I think we can do a >> little rearrangement to keep it happy there.

Re: [HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Michael Paquier
On Thu, Sep 21, 2017 at 7:08 AM, Andrew Dunstan wrote: > First, it warns about a couple of unused variables at lines 4553 and > 4673 of src/backend/optimizer/path/costsize.c. I think we can do a > little rearrangement to keep it happy there. Those are around for some time, see here: https://www.p

[HACKERS] Windows warnings from VS 2017

2017-09-20 Thread Andrew Dunstan
I'm working through testing the changes to allow building with Visual Studio 2017. I've noticed that there are some warnings that we don't see in earlier compilers. First, it warns about a couple of unused variables at lines 4553 and 4673 of src/backend/optimizer/path/costsize.c. I think we can d

[HACKERS] windows warnings

2012-10-07 Thread Andrew Dunstan
I have just noticed the following warnings on currawong (MSVC): "d:\bf\root\HEAD\pgsql.1748\pgsql.sln" (default target) (1) -> (postgres target) -> .\src\backend\utils\adt\array_selfuncs.c(574): warning C4305: '=' : truncation from 'double' to 'float4' .\src\backend\optimizer\path\costsize.