Re: [HACKERS] posmaster failed under high load

Lists: pgsql-hackers
From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] posmaster failed under high load
Date: 1999-05-06 14:20:06
Message-ID: 8811.926000406@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> writes:
>> The only way to get around this is to do an execv(), at which point the
>> kernel will recopy argv[0].

> We used to do execv(), but stopped doing it for performance reasons.

It's clearly not worth re-introducing the exec call just to make ps
status display work (especially since it's only failing when the backend
is swapped out). However, I wonder whether there is another answer.

Something that's been on my to-do list since the ps-status-display code
got added is to import "sendmail"'s ps-status-display module lock, stock,
and barrel. Sendmail's code is kinda ugly, but it's been wrung out and
works on a wide variety of Unixes. The code we have doesn't ... (it's
never worked on my HPUX box, for instance, whereas sendmail does).

I have no idea at the moment whether sendmail knows how to change the
task_struct on Linux; but it might.

regards, tom lane


From: Oleg Broytmann <phd(at)sun(dot)med(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] posmaster failed under high load
Date: 1999-05-06 14:43:39
Message-ID: Pine.SOL2.3.96.SK.990506184139.4180A-100000@sun.med.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Thu, 6 May 1999, Tom Lane wrote:
> Something that's been on my to-do list since the ps-status-display code
> got added is to import "sendmail"'s ps-status-display module lock, stock,
> and barrel. Sendmail's code is kinda ugly, but it's been wrung out and
> works on a wide variety of Unixes. The code we have doesn't ... (it's
> never worked on my HPUX box, for instance, whereas sendmail does).

The code was touched by wu-ftpd authors once. When I thought of stealing
the code I found sources in wu-ftpd distribution a little cleaner.

> regards, tom lane

Oleg.
----
Oleg Broytmann http://members.xoom.com/phd2/ phd2(at)earthling(dot)net
Programmers don't die, they just GOSUB without RETURN.