Re: [PATCH] lock_timeout and common SIGALRM framework - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH] lock_timeout and common SIGALRM framework
Date
Msg-id 18744.1342040615@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] lock_timeout and common SIGALRM framework  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: [PATCH] lock_timeout and common SIGALRM framework  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Excerpts from Tom Lane's message of mié jul 11 15:47:47 -0400 2012:
>> ... that means we need a pretty consistent scheme for
>> where to call InitializeTimeouts.  But we already have the same issue
>> with respect to on_proc_exit callbacks, so we can just add
>> InitializeTimeouts calls in the same places as on_exit_reset().

> I do agree that InitializeTimeouts is not optimally placed.  We
> discussed this upthread.

> Some of the calls of on_exit_reset() are placed in code that's about to
> die.  Surely we don't need InitializeTimeouts() then.  Maybe we should
> have another routine, say InitializeProcess (noting we already
> InitProcess so maybe some name would be good), that calls both
> on_exit_reset and InitializeTimeouts.

Yeah, I was wondering about that too, but it seems a bit ad-hoc from a
modularity standpoint.  I gave some consideration to the idea of putting
these calls directly into fork_process(), but we'd have to be very sure
that there would never be a case where it was incorrect to do them after
forking.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Schema version management
Next
From: Peter Eisentraut
Date:
Subject: Re: pgsql_fdw in contrib