I reported earlier a SegFault when doing an initdb, and have narrowed it
down somewhat...still probing, but figured I'd see if I'm overlooking
something obvious...
From the command line, I'm running:
echo "vacuum" | postgres -o /dev/null -F -Q -D/home/centre/marc/pgsql/data
This is the stage that the first SegFault happens in initdb.
I added some debugging, and it turns out that the 'DataDir' variable isn't
being initialized at this point:
void
read_pg_options(SIGNAL_ARGS)
{
int fd;
int n;
int verbose;
char buffer[BUF_SIZE];
char c;
char *s,
*p;
printf("before sprintf()\n");
printf("%s\n", DataDir);
sprintf(buffer, "%s/%s", DataDir, "pg_options");
printf("after sprintf()\n");
if ((fd = open(buffer, O_RDONLY)) < 0)
return;
=====================
Still looking, but uncovered a slight bug:
diff -cr postgres.c.orig postgres.c
*** postgres.c.orig Tue Oct 13 16:47:00 1998
--- postgres.c Tue Oct 13 16:47:33 1998
***************
*** 1052,1057 ****
--- 1052,1058 ----
case 'D': /* PGDATA directory */
DataDir = optarg;
+ break;
case 'd': /* debug level */
flagQ = false;
Further into it...if I do a setenv PGDATA, it gets around the 'bug'...back
later...
Marc G. Fournier scrappy@hub.org
Systems Administrator @ hub.org
scrappy@{postgresql|isc}.org ICQ#7615664