Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Alvaro Herrera wrote: > >> I wonder if it's OK to grab an LWLock in a signal handler. > > > I am not in a signal handler there --- pg_terminate_backend() happens > > for the person requesting the termination, not the terminated backend > > that gets the signal. > > A more interesting question is what makes you think that taking > ProcArrayLock here has any value whatsoever.
I took the lock so I would be sure the PGPROC array was the matching pid and not some other pid that was created between my check and the setting of the variable. -- Bruce Momjian <[EMAIL PROTECTED]> http://momjian.us EnterpriseDB http://enterprisedb.com + If your life is a hard drive, Christ can be your backup. + -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers