Обсуждение: make installcheck is broken in HEAD on mingw
"make installcheck" seems to be broken in HEAD on mingw for a few days, though it ran sucessfully on Linux. $ cd contrib/citext/ $ make installcheck make -C ../../src/test/regress pg_regress.exe make[1]: Entering directory `/d/projects/head/src/test/regress' make[1]: `pg_regress.exe' is up to date. make[1]: Leaving directory `/d/projects/head/src/test/regress' ../../src/test/regress/pg_regress --inputdir=. --psqldir=/usr/local/pgsql/bin --dbname=contrib_regression citext (using postmaster on localhost, default port) ============== dropping database "contrib_regression" ============== psql: FATAL: attempted change of parameter "port" ignored DETAIL: This parameter cannot be changed after server start. command failed: ""C:/mingw/local/pgsql/bin/psql" -X -c "DROP DATABASE IF EXISTS \"contrib_regression\"" "postgres"" make: *** [installcheck] Error 2 Regards, --- ITAGAKI Takahiro NTT Open Source Software Center
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> "make installcheck" seems to be broken in HEAD on mingw for a few days,
> though it ran sucessfully on Linux.
The mingw buildfarm machines seem to be happy. Are you sure you
have a clean build?
regards, tom lane
Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> > "make installcheck" seems to be broken in HEAD on mingw for a few days,
> > though it ran sucessfully on Linux.
>
> The mingw buildfarm machines seem to be happy. Are you sure you
> have a clean build?
Yes, but distclean and deleting auto-generated files won't work.
Here is a result of printf-debug for process_postgres_switches() in postgres.c.
WARNING: postgres: pid=3360 WARNING: startup packet[0] = postgres WARNING: startup packet[1] = postgres
WARNING: postgres: pid=3360 WARNING: startup packet[0] = postgres WARNING: startup packet[1] = -c WARNING:
startuppacket[2] = intervalstyle=postgres_verbose WARNING: getopt(p) = ostgres FATAL: attempted change of
parameter"port" ignored
The first argument 'postgres' was interpreted as "-p ostgres" by getopt().
We might need to re-initilaize variables for getopt() because we call
process_postgres_switches twice(). So getopt() is also called twice.
But optind=1 has no effect in my environment and optind=0 crashes
backend with stack-overflow...
(Are there any known bugs in mingw's getopt?)
BTW, the following code seems to be a bit storange.
The part of { argv++; argc--; } removes the first arugment,
but '--single' argument (argv[1]) is not removed, no?
if (secure){ gucsource = PGC_S_ARGV; /* switches came from command line */
/* Ignore the initial --single argument, if present */ if (argc > 1 && strcmp(argv[1], "--single") == 0) {
argv++; argc--; }}
Regards,
---
ITAGAKI Takahiro
NTT Open Source Software Center
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> WARNING: getopt(p) = ostgres
> FATAL: attempted change of parameter "port" ignored
> The first argument 'postgres' was interpreted as "-p ostgres" by getopt().
Ugh.
> We might need to re-initilaize variables for getopt() because we call
> process_postgres_switches twice(). So getopt() is also called twice.
Yeah. process_postgres_switches attempts to do that, using code that
is the same as in postmaster.c. However I suppose that in mingw the
intervening fork/exec might manage to reset getopt() in some other way.
> (Are there any known bugs in mingw's getopt?)
No idea, but maybe you are running a different mingw version than the
buildfarm machines are using?
> BTW, the following code seems to be a bit storange.
> The part of { argv++; argc--; } removes the first arugment,
> but '--single' argument (argv[1]) is not removed, no?
This is just the same as what was there for the last year or so.
I only moved it to a different place ...
regards, tom lane