Re: Patch proposal: New hooks in the connection path

2023-04-04 Thread Drouvot, Bertrand
Hi, On 4/4/23 12:08 AM, Gregory Stark (as CFM) wrote: This looks like it was a good discussion -- last summer. But it doesn't seem to be a patch under active development now. It sounds like there were some design constraints that still need some new ideas to solve and a new patch will be needed

Re: Patch proposal: New hooks in the connection path

2023-04-03 Thread Gregory Stark (as CFM)
This looks like it was a good discussion -- last summer. But it doesn't seem to be a patch under active development now. It sounds like there were some design constraints that still need some new ideas to solve and a new patch will be needed to address them. Should this be marked Returned With Fe

Re: Patch proposal: New hooks in the connection path

2022-08-16 Thread Gurjeet Singh
On Tue, Aug 16, 2022 at 3:16 AM Bharath Rupireddy wrote: > > On Tue, Aug 16, 2022 at 1:55 PM Drouvot, Bertrand wrote: > > > > Hi, > > > > On 8/16/22 10:10 AM, Bharath Rupireddy wrote: > > > On Tue, Aug 16, 2022 at 1:31 PM Drouvot, Bertrand > > > wrote: > > >> On 8/14/22 7:52 AM, Gurjeet Singh w

Re: Patch proposal: New hooks in the connection path

2022-08-16 Thread Bharath Rupireddy
On Tue, Aug 16, 2022 at 1:55 PM Drouvot, Bertrand wrote: > > Hi, > > On 8/16/22 10:10 AM, Bharath Rupireddy wrote: > > On Tue, Aug 16, 2022 at 1:31 PM Drouvot, Bertrand > > wrote: > >> On 8/14/22 7:52 AM, Gurjeet Singh wrote: > >>> On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand > >>> wrote:

Re: Patch proposal: New hooks in the connection path

2022-08-16 Thread Drouvot, Bertrand
Hi, On 8/16/22 10:10 AM, Bharath Rupireddy wrote: On Tue, Aug 16, 2022 at 1:31 PM Drouvot, Bertrand wrote: On 8/14/22 7:52 AM, Gurjeet Singh wrote: On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand wrote: I think we can reduce the number of places the hook is called, if we call the hook from

Re: Patch proposal: New hooks in the connection path

2022-08-16 Thread Bharath Rupireddy
On Tue, Aug 16, 2022 at 1:31 PM Drouvot, Bertrand wrote: > > On 8/14/22 7:52 AM, Gurjeet Singh wrote: > > On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand > > wrote: > > > I think we can reduce the number of places the hook is called, if we > > call the hook from proc_exit(), and at all the othe

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
(reposting the same review, with many grammatical fixes) On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand wrote: > Please find attached v2-0004-connection_hooks.patch /* * Stop here if it was bad or a cancel packet. ProcessStartupPacket * already did any appropriate error repor

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Gurjeet Singh
On Mon, Aug 8, 2022 at 3:51 AM Drouvot, Bertrand wrote: > Please find attached v2-0004-connection_hooks.patch /* * Stop here if it was bad or a cancel packet. ProcessStartupPacket * already did any appropriate error reporting. */ if (status != STATUS_OK) +{ +#ifnd

Re: Patch proposal: New hooks in the connection path

2022-08-13 Thread Bharath Rupireddy
On Tue, Aug 2, 2022 at 6:55 PM Drouvot, Bertrand wrote: > > Hi Bharath, > > On 7/14/22 11:43 AM, Bharath Rupireddy wrote: > > On Fri, Jul 8, 2022 at 5:54 PM Bharath Rupireddy > > wrote: > >> Looking at v2-0003 patch and emit_log_hook, how about we filter out > >> for those connectivity errors eit

Re: Patch proposal: New hooks in the connection path

2022-07-14 Thread Bharath Rupireddy
On Fri, Jul 8, 2022 at 5:54 PM Bharath Rupireddy wrote: > > Looking at v2-0003 patch and emit_log_hook, how about we filter out > for those connectivity errors either based on error codes and if they > aren't unique, perhaps passing special flags to ereport API indicating > that it's a connectivit

Re: Patch proposal: New hooks in the connection path

2022-07-08 Thread Tom Lane
Bharath Rupireddy writes: > On Fri, Jul 8, 2022 at 1:40 AM Tom Lane wrote: >> 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. > I agree with this. But, all of the areas that v2-0003 touched for >

Re: Patch proposal: New hooks in the connection path

2022-07-08 Thread Bharath Rupireddy
On Fri, Jul 8, 2022 at 1:40 AM Tom Lane wrote: > > Joe Conway 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 > > spe

Re: Patch proposal: New hooks in the connection path

2022-07-07 Thread Tom Lane
Joe Conway 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

Re: Patch proposal: New hooks in the connection path

2022-07-07 Thread Joe Conway
On 7/6/22 04:13, Drouvot, Bertrand wrote: On 7/6/22 12:11 AM, Joe Conway wrote: On 7/5/22 03:37, Bharath Rupireddy wrote: 2. Timeout Handler is a signal handler, called as part of SIGALRM signal handler, most of the times, signal handlers ought to be doing small things, now that we are handing

Re: Patch proposal: New hooks in the connection path

2022-07-06 Thread Drouvot, Bertrand
Hi, On 7/6/22 12:11 AM, Joe Conway wrote: On 7/5/22 03:37, Bharath Rupireddy wrote: On Mon, Jul 4, 2022 at 6:23 PM Drouvot, Bertrand wrote: On 7/2/22 1:00 AM, Nathan Bossart wrote: > Could we model this after fmgr_hook?  The first argument in that hook > indicates where it is being called fr

Re: Patch proposal: New hooks in the connection path

2022-07-05 Thread Joe Conway
On 7/5/22 03:37, Bharath Rupireddy wrote: On Mon, Jul 4, 2022 at 6:23 PM Drouvot, Bertrand wrote: On 7/2/22 1:00 AM, Nathan Bossart wrote: > Could we model this after fmgr_hook? The first argument in that hook > indicates where it is being called from. This doesn't alleviate the need > for se

Re: Patch proposal: New hooks in the connection path

2022-07-05 Thread Bharath Rupireddy
On Mon, Jul 4, 2022 at 6:23 PM Drouvot, Bertrand wrote: > > Hi, > > On 7/2/22 1:00 AM, Nathan Bossart wrote: > > Could we model this after fmgr_hook? The first argument in that hook > > indicates where it is being called from. This doesn't alleviate the need > > for several calls to the hook in

Re: Patch proposal: New hooks in the connection path

2022-07-05 Thread Bharath Rupireddy
On Mon, Jul 4, 2022 at 6:29 PM Drouvot, Bertrand wrote: > > On 7/2/22 2:49 AM, Roberto Mello wrote: > > On Fri, Jul 1, 2022 at 5:00 PM Nathan Bossart > wrote: >> >> That being said, I don't see why this information couldn't be provided in a >> system view. IMO it is generically useful. > > +1 f

Re: Patch proposal: New hooks in the connection path

2022-07-04 Thread Zhihong Yu
On Mon, Jul 4, 2022 at 5:54 AM Drouvot, Bertrand wrote: > Hi, > > On 7/2/22 1:00 AM, Nathan Bossart wrote: > > Could we model this after fmgr_hook? The first argument in that hook > > indicates where it is being called from. This doesn't alleviate the need > > for several calls to the hook in t

Re: Patch proposal: New hooks in the connection path

2022-07-01 Thread Roberto Mello
On Fri, Jul 1, 2022 at 5:00 PM Nathan Bossart wrote: > > > That being said, I don't see why this information couldn't be provided in a > system view. IMO it is generically useful. +1 for a system view with appropriate permissions, in addition to the hooks. That would make the information easi

Re: Patch proposal: New hooks in the connection path

2022-07-01 Thread Nathan Bossart
On Fri, Jul 01, 2022 at 09:48:40AM +0200, Drouvot, Bertrand wrote: >> However, I'm personally not okay with having multiple hooks >> as proposed in the v1 patch. > > I agree that it would be great to reduce the number of proposed hooks. > > But, > >> Can we think of having a single hook > > T

Re: Patch proposal: New hooks in the connection path

2022-06-30 Thread Bharath Rupireddy
On Thu, Jun 30, 2022 at 1:31 PM Drouvot, Bertrand wrote: > > Hi hackers, > > While commit 960869da08 added some information about connections that have > been successfully authenticated, there is no metrics for connections that > have not (or did not reached the authentication stage). > > Adding