From: | "Marc G(dot) Fournier" <scrappy(at)hub(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Odd problem with read_pg_options ... |
Date: | 1998-10-13 19:51:07 |
Message-ID: | Pine.BSF.4.05.9810131541540.4514-100000@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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(at)hub(dot)org
Systems Administrator @ hub.org
scrappy(at){postgresql|isc}.org ICQ#7615664
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 1998-10-13 20:06:44 | Ordering problem in backend/tcop/postgres.c ... |
Previous Message | Jeff Hoffmann | 1998-10-13 19:23:35 | Re: [HACKERS] What about LIMIT in SELECT ? |