Re: Patch proposal: New hooks in the connection path - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch proposal: New hooks in the connection path
Date
Msg-id 3091617.1657224634@sss.pgh.pa.us
Whole thread Raw
In response to Re: Patch proposal: New hooks in the connection path  (Joe Conway <mail@joeconway.com>)
Responses Re: Patch proposal: New hooks in the connection path
Re: Patch proposal: New hooks in the connection path
List pgsql-hackers
Joe Conway <mail@joeconway.com> writes:
> It isn't clear to me if having a hook in the timeout handler is a 
> nonstarter -- perhaps a comment with suitable warning for prospective 
> extension authors is enough? Anyone else want to weigh in on this issue 
> specifically?

It doesn't seem like a great place for a hook, because the list of stuff
you could safely do there would be mighty short, possibly the empty set.
Write to shared memory?  Not too safe.  Write to a file?  Even less.
Write to local memory?  Pointless, because we're about to _exit(1).
Pretty much anything I can think of that you'd want to do is something
we've already decided the core code can't safely do, and putting it
in a hook won't make it safer.

If someone wants to argue for this hook, I'd like to see a credible
example of a *safe* use-case, keeping in mind the points raised in
the comments in BackendInitialize and process_startup_packet_die.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Joe Conway
Date:
Subject: Re: Patch proposal: New hooks in the connection path
Next
From: Bruce Momjian
Date:
Subject: Re: pg15b2: large objects lost on upgrade