Re: Can we simplify win32 threading code

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can we simplify win32 threading code
Date: 2005-06-01 14:36:40
Message-ID: 13832.1117636600@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
> Why not just use the pid in teh name, and have one segment per backend?

Being used only for signals you mean? That might work.

I dislike fooling around with the contents of postmaster.pid, as that
will inject platform-specific code into places where there is none now.
If that's what the patch ends up requiring, I for one will vote to leave
things as they are now.

>> (2) Postmaster will startup a thread monitoring messages,
>> pg_ctl simulate "kill" by sending postmaster a message
>> <target_pid, signum>, then postmaster will forward this
>> "signum" to "target_pid";

> I don't like that. If the postmaster dies, how will you signal the
> remaining backends?

Agreed, this seems pretty fragile ... and one thing you want from signal
processing is robustness. It needs to be possible to signal a given
process without any support from any other.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-06-01 14:38:24 Re: ODBC
Previous Message Tom Lane 2005-06-01 14:31:07 Re: Interval->day proposal