Re: Can we simplify win32 threading code - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Can we simplify win32 threading code
Date
Msg-id 13832.1117636600@sss.pgh.pa.us
Whole thread Raw
In response to Re: Can we simplify win32 threading code  ("Magnus Hagander" <mha@sollentuna.net>)
List pgsql-hackers
"Magnus Hagander" <mha@sollentuna.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Interval->day proposal
Next
From: Tom Lane
Date:
Subject: Re: ODBC