Hi, pgbench contrib module is doing segmentation fault on Solaris when -d option is specified without -p option specified.
This is because the -d option dumps the connection information and the default value of pgport variable is NULL which causes segmentation fault on Solaris when NULL is passed to printf function. Attached is a trivial patch that changes the default value of pgport to empty string. PQsetdbLogin function does not make any difference between NULL and empty string. Regards Julo
*** ./contrib/pgbench/pgbench.c.orig Wed Aug 22 10:38:27 2007 --- ./contrib/pgbench/pgbench.c Wed Aug 22 10:38:45 2007 *************** *** 87,93 **** int is_connect; /* establish connection for each transaction */ char *pghost = ""; ! char *pgport = NULL; char *pgoptions = NULL; char *pgtty = NULL; char *login = NULL; --- 87,93 ---- int is_connect; /* establish connection for each transaction */ char *pghost = ""; ! char *pgport = ""; char *pgoptions = NULL; char *pgtty = NULL; char *login = NULL;
---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster