From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, "'''pgsql-patches(at)postgresql(dot)org' ' '" <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: fork/exec patch: pre-CreateProcess finalization |
Date: | 2004-01-09 01:27:26 |
Message-ID: | 3FFE037E.4040005@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
Bruce Momjian wrote:
> Tom Lane wrote:
>> > Claudio Natoli wrote:
>> >> The only things I've thought of so far are:
>> >> a) sticking the PID/cancel key list in shared mem [yeech]
>> >> b) rearranging the entire cancel handling to occur in the postmaster [double
>> >> yeech]
>>
>> (a) seems like the lesser of the available evils (unless someone has a
>> bright idea for a plan C).
>>
>> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
>> > I think we need to move in the direction of a separate fork/exec-only
>> > shared memory segment that holds the pids and cancel keys for all the
>> > backends.
>>
>> That doesn't seem worth the trouble. I'd be inclined to just stick the
>> cancel keys in the PGPROC structures (I believe the PIDs are already in
>> there). The original motivation for keeping them only in postmaster
>> local memory was to keep backend A's cancel key away from the prying
>> eyes of backend B, but is there really any security added? Anyone who
>> can inspect PGPROC hardly needs to know the cancel key --- he can just
>> issue a SIGINT (or worse) directly to the target backend.
>
> Agreed. I was going for a separate one just to be paranoid. This will
> only be done for exec(), so I don't see a problem for normal Unix use
> anyway.
>
It doesn't hurt to keep the locations and code as much in sync as
possible. I think Tom's idea to move the information into the PGPROC
entry is the winner and does not need any OS specific handling.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Jan Wieck | 2004-01-09 01:37:56 | Re: fork/exec patch: pre-CreateProcess finalization |
Previous Message | Bruce Momjian | 2004-01-09 01:23:40 | Re: fork/exec patch: pre-CreateProcess finalization |