Re: win32 build and test issues

Lists: pgsql-hackers-win32pgsql-patches
From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: win32 build and test issues
Date: 2004-04-30 16:03:50
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34B8D5@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches

>I'm also thinking of creating a simple commandline interface
>for pqkill
>that can be used to make a clean shutdown.

See the win32 status page, there is a link to one already.

//Magnus


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-04-30 16:55:08
Message-ID: 409284EC.6030609@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches

Magnus Hagander wrote:

>>I'm also thinking of creating a simple commandline interface
>>for pqkill
>>that can be used to make a clean shutdown.
>>
>>
>
>See the win32 status page, there is a link to one already.
>
>//Magnus
>
>
>

I will check it out. Meanwhile, there's promising news. With the patch
below applied to psql, I can run "make check" under MinGW and get all
but 12 tests passing. The remainder appear to be all related to the
timestamp issue, the floating point scientific format issue, and the
join sort order issue, which have been previously noted.

I'm not suggesting applying the patch yet - I'd like to know why the
line end thing cares what platform it is using - presumably regardless
of where it runs it is still using MSVCRT.

cheers

andrew

Index: startup.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
retrieving revision 1.91
diff -c -w -r1.91 startup.c
*** startup.c 22 Apr 2004 14:34:38 -0000 1.91
--- startup.c 30 Apr 2004 16:44:45 -0000
***************
*** 124,129 ****
--- 124,132 ----
}
}

+ #ifdef WIN32
+ setvbuf(stderr,NULL,_IONBF,0);
+ #endif
pset.cur_cmd_source = stdin;
pset.cur_cmd_interactive = false;
pset.encoding = PQenv2encoding();
Index: print.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
retrieving revision 1.46
diff -c -w -r1.46 print.c
*** print.c 24 Jan 2004 20:43:26 -0000 1.46
--- print.c 30 Apr 2004 16:44:46 -0000
***************
*** 388,394 ****
--- 388,396 ----
for (ptr = footers; *ptr; ptr++)
fprintf(fout, "%s\n", *ptr);

+ #ifndef WIN32
fputc('\n', fout);
+ #endif

/* clean up */
free(cell_w);


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-05-01 02:43:22
Message-ID: 200405010243.i412hMD25517@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches


Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Andrew Dunstan wrote:
> Magnus Hagander wrote:
>
> >>I'm also thinking of creating a simple commandline interface
> >>for pqkill
> >>that can be used to make a clean shutdown.
> >>
> >>
> >
> >See the win32 status page, there is a link to one already.
> >
> >//Magnus
> >
> >
> >
>
> I will check it out. Meanwhile, there's promising news. With the patch
> below applied to psql, I can run "make check" under MinGW and get all
> but 12 tests passing. The remainder appear to be all related to the
> timestamp issue, the floating point scientific format issue, and the
> join sort order issue, which have been previously noted.
>
> I'm not suggesting applying the patch yet - I'd like to know why the
> line end thing cares what platform it is using - presumably regardless
> of where it runs it is still using MSVCRT.
>
> cheers
>
> andrew
>
>
>
> Index: startup.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
> retrieving revision 1.91
> diff -c -w -r1.91 startup.c
> *** startup.c 22 Apr 2004 14:34:38 -0000 1.91
> --- startup.c 30 Apr 2004 16:44:45 -0000
> ***************
> *** 124,129 ****
> --- 124,132 ----
> }
> }
>
> + #ifdef WIN32
> + setvbuf(stderr,NULL,_IONBF,0);
> + #endif
> pset.cur_cmd_source = stdin;
> pset.cur_cmd_interactive = false;
> pset.encoding = PQenv2encoding();
> Index: print.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
> retrieving revision 1.46
> diff -c -w -r1.46 print.c
> *** print.c 24 Jan 2004 20:43:26 -0000 1.46
> --- print.c 30 Apr 2004 16:44:46 -0000
> ***************
> *** 388,394 ****
> --- 388,396 ----
> for (ptr = footers; *ptr; ptr++)
> fprintf(fout, "%s\n", *ptr);
>
> + #ifndef WIN32
> fputc('\n', fout);
> + #endif
>
> /* clean up */
> free(cell_w);
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: "Andrew Dunstan" <andrew(at)dunslane(dot)net>
To: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: win32 build and test issues
Date: 2004-05-01 03:01:51
Message-ID: 4682.24.211.141.25.1083380511.squirrel@www.dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches

Bruce,

the setvbuf patch for startup.c should be applied, as all it does is
ensure well understood and expected (i.e. = Unix) behaviour for stderr on
Win32.

I am not happy about the patch for print.c unless I can work out *why* it
works, or someone can explain it to me. (That's why i made the comment
below about not applying it, and didn't send it to -patches.)

cheers

andrew

Bruce Momjian said:
>
> Your patch has been added to the PostgreSQL unapplied patches list at:
>
> http://momjian.postgresql.org/cgi-bin/pgpatches
>
> I will try to apply it within the next 48 hours.
>
> -------------------------------------------------------------------------
--
>
>
> Andrew Dunstan wrote:
>> Magnus Hagander wrote:
>>
>> >>I'm also thinking of creating a simple commandline interface
>> >>for pqkill
>> >>that can be used to make a clean shutdown.
>> >>
>> >>
>> >
>> >See the win32 status page, there is a link to one already.
>> >
>> >//Magnus
>> >
>> >
>> >
>>
>> I will check it out. Meanwhile, there's promising news. With the patch
>> below applied to psql, I can run "make check" under MinGW and get all
>> but 12 tests passing. The remainder appear to be all related to the
>> timestamp issue, the floating point scientific format issue, and the
>> join sort order issue, which have been previously noted.
>>
>> I'm not suggesting applying the patch yet - I'd like to know why the
>> line end thing cares what platform it is using - presumably regardless
>> of where it runs it is still using MSVCRT.
>>
>> cheers
>>
>> andrew
>>
>>
>>
>> Index: startup.c
>> ===================================================================
>> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
>> retrieving revision 1.91
>> diff -c -w -r1.91 startup.c
>> *** startup.c 22 Apr 2004 14:34:38 -0000 1.91
>> --- startup.c 30 Apr 2004 16:44:45 -0000
>> ***************
>> *** 124,129 ****
>> --- 124,132 ----
>> }
>> }
>>
>> + #ifdef WIN32
>> + setvbuf(stderr,NULL,_IONBF,0);
>> + #endif
>> pset.cur_cmd_source = stdin;
>> pset.cur_cmd_interactive = false;
>> pset.encoding = PQenv2encoding();
>> Index: print.c
>> ===================================================================
>> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
>> retrieving revision 1.46
>> diff -c -w -r1.46 print.c
>> *** print.c 24 Jan 2004 20:43:26 -0000 1.46
>> --- print.c 30 Apr 2004 16:44:46 -0000
>> ***************
>> *** 388,394 ****
>> --- 388,396 ----
>> for (ptr = footers; *ptr; ptr++)
>> fprintf(fout, "%s\n", *ptr);
>>
>> + #ifndef WIN32
>> fputc('\n', fout);
>> + #endif
>>
>> /* clean up */
>> free(cell_w);
>>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-05-01 03:09:48
Message-ID: 200405010309.i4139m228760@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches


OK will apply only the first part.

---------------------------------------------------------------------------

Andrew Dunstan wrote:
>
>
> Bruce,
>
> the setvbuf patch for startup.c should be applied, as all it does is
> ensure well understood and expected (i.e. = Unix) behaviour for stderr on
> Win32.
>
> I am not happy about the patch for print.c unless I can work out *why* it
> works, or someone can explain it to me. (That's why i made the comment
> below about not applying it, and didn't send it to -patches.)
>
> cheers
>
> andrew
>
>
>
> Bruce Momjian said:
> >
> > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > http://momjian.postgresql.org/cgi-bin/pgpatches
> >
> > I will try to apply it within the next 48 hours.
> >
> > -------------------------------------------------------------------------
> --
> >
> >
> > Andrew Dunstan wrote:
> >> Magnus Hagander wrote:
> >>
> >> >>I'm also thinking of creating a simple commandline interface
> >> >>for pqkill
> >> >>that can be used to make a clean shutdown.
> >> >>
> >> >>
> >> >
> >> >See the win32 status page, there is a link to one already.
> >> >
> >> >//Magnus
> >> >
> >> >
> >> >
> >>
> >> I will check it out. Meanwhile, there's promising news. With the patch
> >> below applied to psql, I can run "make check" under MinGW and get all
> >> but 12 tests passing. The remainder appear to be all related to the
> >> timestamp issue, the floating point scientific format issue, and the
> >> join sort order issue, which have been previously noted.
> >>
> >> I'm not suggesting applying the patch yet - I'd like to know why the
> >> line end thing cares what platform it is using - presumably regardless
> >> of where it runs it is still using MSVCRT.
> >>
> >> cheers
> >>
> >> andrew
> >>
> >>
> >>
> >> Index: startup.c
> >> ===================================================================
> >> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
> >> retrieving revision 1.91
> >> diff -c -w -r1.91 startup.c
> >> *** startup.c 22 Apr 2004 14:34:38 -0000 1.91
> >> --- startup.c 30 Apr 2004 16:44:45 -0000
> >> ***************
> >> *** 124,129 ****
> >> --- 124,132 ----
> >> }
> >> }
> >>
> >> + #ifdef WIN32
> >> + setvbuf(stderr,NULL,_IONBF,0);
> >> + #endif
> >> pset.cur_cmd_source = stdin;
> >> pset.cur_cmd_interactive = false;
> >> pset.encoding = PQenv2encoding();
> >> Index: print.c
> >> ===================================================================
> >> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
> >> retrieving revision 1.46
> >> diff -c -w -r1.46 print.c
> >> *** print.c 24 Jan 2004 20:43:26 -0000 1.46
> >> --- print.c 30 Apr 2004 16:44:46 -0000
> >> ***************
> >> *** 388,394 ****
> >> --- 388,396 ----
> >> for (ptr = footers; *ptr; ptr++)
> >> fprintf(fout, "%s\n", *ptr);
> >>
> >> + #ifndef WIN32
> >> fputc('\n', fout);
> >> + #endif
> >>
> >> /* clean up */
> >> free(cell_w);
> >>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: win32 build and test issues
Date: 2004-05-02 04:26:47
Message-ID: 200405020426.i424Qla14068@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches

Andrew Dunstan wrote:
>
>
> Bruce,
>
> the setvbuf patch for startup.c should be applied, as all it does is
> ensure well understood and expected (i.e. = Unix) behaviour for stderr on
> Win32.

OK, this first part of the patch was applied. I will discard the second
part and wait for your continued research. Thanks.

---------------------------------------------------------------------------

>
> I am not happy about the patch for print.c unless I can work out *why* it
> works, or someone can explain it to me. (That's why i made the comment
> below about not applying it, and didn't send it to -patches.)
>
> cheers
>
> andrew
>
>
>
> Bruce Momjian said:
> >
> > Your patch has been added to the PostgreSQL unapplied patches list at:
> >
> > http://momjian.postgresql.org/cgi-bin/pgpatches
> >
> > I will try to apply it within the next 48 hours.
> >
> > -------------------------------------------------------------------------
> --
> >
> >
> > Andrew Dunstan wrote:
> >> Magnus Hagander wrote:
> >>
> >> >>I'm also thinking of creating a simple commandline interface
> >> >>for pqkill
> >> >>that can be used to make a clean shutdown.
> >> >>
> >> >>
> >> >
> >> >See the win32 status page, there is a link to one already.
> >> >
> >> >//Magnus
> >> >
> >> >
> >> >
> >>
> >> I will check it out. Meanwhile, there's promising news. With the patch
> >> below applied to psql, I can run "make check" under MinGW and get all
> >> but 12 tests passing. The remainder appear to be all related to the
> >> timestamp issue, the floating point scientific format issue, and the
> >> join sort order issue, which have been previously noted.
> >>
> >> I'm not suggesting applying the patch yet - I'd like to know why the
> >> line end thing cares what platform it is using - presumably regardless
> >> of where it runs it is still using MSVCRT.
> >>
> >> cheers
> >>
> >> andrew
> >>
> >>
> >>
> >> Index: startup.c
> >> ===================================================================
> >> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/startup.c,v
> >> retrieving revision 1.91
> >> diff -c -w -r1.91 startup.c
> >> *** startup.c 22 Apr 2004 14:34:38 -0000 1.91
> >> --- startup.c 30 Apr 2004 16:44:45 -0000
> >> ***************
> >> *** 124,129 ****
> >> --- 124,132 ----
> >> }
> >> }
> >>
> >> + #ifdef WIN32
> >> + setvbuf(stderr,NULL,_IONBF,0);
> >> + #endif
> >> pset.cur_cmd_source = stdin;
> >> pset.cur_cmd_interactive = false;
> >> pset.encoding = PQenv2encoding();
> >> Index: print.c
> >> ===================================================================
> >> RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
> >> retrieving revision 1.46
> >> diff -c -w -r1.46 print.c
> >> *** print.c 24 Jan 2004 20:43:26 -0000 1.46
> >> --- print.c 30 Apr 2004 16:44:46 -0000
> >> ***************
> >> *** 388,394 ****
> >> --- 388,396 ----
> >> for (ptr = footers; *ptr; ptr++)
> >> fprintf(fout, "%s\n", *ptr);
> >>
> >> + #ifndef WIN32
> >> fputc('\n', fout);
> >> + #endif
> >>
> >> /* clean up */
> >> free(cell_w);
> >>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-05-02 17:52:57
Message-ID: 40953579.1090002@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches


I have tried very hard to work out why this patch works for the
regression tests in MINGW/MSys, but it doesn't make any sense why this
one call should add an extra blank line. Does anyone have any bright
ideas? I'm reluctant to say I think we should apply it until the problem
is understood and the behaviour explained. But it does appear to work.

cheers

andrew

>>>>Index: print.c
>>>>===================================================================
>>>>RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
>>>>retrieving revision 1.46
>>>>diff -c -w -r1.46 print.c
>>>>*** print.c 24 Jan 2004 20:43:26 -0000 1.46
>>>>--- print.c 30 Apr 2004 16:44:46 -0000
>>>>***************
>>>>*** 388,394 ****
>>>>--- 388,396 ----
>>>> for (ptr = footers; *ptr; ptr++)
>>>> fprintf(fout, "%s\n", *ptr);
>>>>
>>>>+ #ifndef WIN32
>>>> fputc('\n', fout);
>>>>+ #endif
>>>>
>>>> /* clean up */
>>>> free(cell_w);
>>>>
>>>>
>>>>


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-05-02 18:22:27
Message-ID: 200405021822.i42IMRe15552@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches


Andrew, can you illustrate to the group the exact difference in output?

---------------------------------------------------------------------------

Andrew Dunstan wrote:
>
> I have tried very hard to work out why this patch works for the
> regression tests in MINGW/MSys, but it doesn't make any sense why this
> one call should add an extra blank line. Does anyone have any bright
> ideas? I'm reluctant to say I think we should apply it until the problem
> is understood and the behaviour explained. But it does appear to work.
>
> cheers
>
> andrew
>
>
>
> >>>>Index: print.c
> >>>>===================================================================
> >>>>RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
> >>>>retrieving revision 1.46
> >>>>diff -c -w -r1.46 print.c
> >>>>*** print.c 24 Jan 2004 20:43:26 -0000 1.46
> >>>>--- print.c 30 Apr 2004 16:44:46 -0000
> >>>>***************
> >>>>*** 388,394 ****
> >>>>--- 388,396 ----
> >>>> for (ptr = footers; *ptr; ptr++)
> >>>> fprintf(fout, "%s\n", *ptr);
> >>>>
> >>>>+ #ifndef WIN32
> >>>> fputc('\n', fout);
> >>>>+ #endif
> >>>>
> >>>> /* clean up */
> >>>> free(cell_w);
> >>>>
> >>>>
> >>>>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073


From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-hackers-win32(at)postgresql(dot)org
Subject: Re: win32 build and test issues
Date: 2004-05-02 18:36:44
Message-ID: 40953FBC.5040803@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers-win32 pgsql-patches


I will post a diff tomorrow. It's the extra blank lines in the
regression output thing that Claudio and others have remarked on. It
happens after every "(nnn rows)" line.

cheers

andrew

Bruce Momjian wrote:

>Andrew, can you illustrate to the group the exact difference in output?
>
>---------------------------------------------------------------------------
>
>Andrew Dunstan wrote:
>
>
>>I have tried very hard to work out why this patch works for the
>>regression tests in MINGW/MSys, but it doesn't make any sense why this
>>one call should add an extra blank line. Does anyone have any bright
>>ideas? I'm reluctant to say I think we should apply it until the problem
>>is understood and the behaviour explained. But it does appear to work.
>>
>>cheers
>>
>>andrew
>>
>>
>>
>>
>>
>>>>>>Index: print.c
>>>>>>===================================================================
>>>>>>RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/print.c,v
>>>>>>retrieving revision 1.46
>>>>>>diff -c -w -r1.46 print.c
>>>>>>*** print.c 24 Jan 2004 20:43:26 -0000 1.46
>>>>>>--- print.c 30 Apr 2004 16:44:46 -0000
>>>>>>***************
>>>>>>*** 388,394 ****
>>>>>>--- 388,396 ----
>>>>>> for (ptr = footers; *ptr; ptr++)
>>>>>> fprintf(fout, "%s\n", *ptr);
>>>>>>
>>>>>>+ #ifndef WIN32
>>>>>> fputc('\n', fout);
>>>>>>+ #endif
>>>>>>
>>>>>> /* clean up */
>>>>>> free(cell_w);
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>
>>
>>---------------------------(end of broadcast)---------------------------
>>TIP 7: don't forget to increase your free space map settings
>>
>>
>>
>
>
>