Re: [HACKERS] [PATCH] A hook for session start - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] [PATCH] A hook for session start
Date
Msg-id CA+TgmobqM_TXb=0Gq8E02sFVacEiasetY1Ts9J2q18KUawTEFA@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] [PATCH] A hook for session start  (Craig Ringer <craig@2ndquadrant.com>)
Responses Re: [HACKERS] [PATCH] A hook for session start
Re: [HACKERS] [PATCH] A hook for session start
List pgsql-hackers
On Fri, Jul 21, 2017 at 11:10 AM, Craig Ringer <craig@2ndquadrant.com> wrote:
> Don't we have that timestamp already?
>
> What practical use cases are there for acting post-auth but that can't wait
> until the user tries to do something?

Have, yes; record, no.

> Can a user do anything remotely interesting or useful without hitting either
> ExecutorStart_hook or ProcessUtility_hook? They can parse queries I guess
> but you could just set your hook up in the parser instead. If you hook the
> parser all they can do is open an idle session and sit there...

That's an exceedingly-weak argument for rejecting this patch.  The
fact that you can probably hack around the lack of a hook for most
reasonable use cases is not an argument for having a hook that does
what people actually want to do.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [HACKERS] Increase Vacuum ring buffer.
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] PgFDW connection invalidation by ALTER SERVER/ALTER USER MAPPING