Problem getting postmaster PID in pg_regress
От | Eric E |
---|---|
Тема | Problem getting postmaster PID in pg_regress |
Дата | |
Msg-id | 44C10210.3000702@gmail.com обсуждение исходный текст |
Ответ на | Re: apparent wraparound (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Problem getting postmaster PID in pg_regress
|
Список | pgsql-general |
Hi all, I'm trying to run pg_regress as part of a build of Postgres 8.1 on Suse Linux Enterprise Server 9. I keep getting the following error: ./pg_regress: line 264: kill: (25049) - No such process I chased the problem down to the following lines in pg_regress: "$bindir/postmaster" -D "$PGDATA" -F $postmaster_options >"$LOGDIR/postmaster.log"; 2>&1 & postmaster_pid=$! When I run sh -x pg_regress, I get: +/usr/src/packages/BUILD/postgresql-8.1.4/src/test/regress/./tmp_check/install//usr/bin/postmaster \ /usr/src/packages/BUILD/postgresql-8.1.4/src/test/regress/./tmp_check/data -F -c listen_addresses= + postmaster_pid=25049 As I understand it, $! is supposed to return the process id of the last backgrounded process. However, in my case it's return a process ID 1 greater than the actual postmaster instance. I end up with the following process tree 25048 ? Ss 0:00 /usr/src/packages/BUILD/postgresql-8.1.4/src/test/regress/./tmp_check/install//usr/bin/postmaster -D /usr/s 25054 ? S 0:00 \_ postgres: logger process 25056 ? S 0:00 \_ postgres: writer process 25057 ? S 0:00 \_ postgres: stats buffer process 25058 ? S 0:00 \_ postgres: stats collector process Then of course when the script tries kill -0 on a 25049 to see if the postmaster came up, it wrongly concludes that postmaster did not start. Can anyone help understand this behavior and/or get the proper process ID? Thanks, Eric
В списке pgsql-general по дате отправления: