Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) - Mailing list pgsql-hackers

From Kirk Wolak
Subject Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
Date
Msg-id CACLU5mS10dea+A8vF0RPS16=K3OYEdAUECY_Kgt1feOFnNtdWg@mail.gmail.com
Whole thread Raw
In response to Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)  (Maciek Sakrejda <m.sakrejda@gmail.com>)
List pgsql-hackers
On Thu, Feb 23, 2023 at 1:16 PM Maciek Sakrejda <m.sakrejda@gmail.com> wrote:
On Thu, Feb 23, 2023, 09:55 Nikolay Samokhvalov <samokhvalov@gmail.com> wrote:
On Thu, Feb 23, 2023 at 9:05 AM Maciek Sakrejda <m.sakrejda@gmail.com> wrote:
I think Heikki's solution is probably more practical since (1) ..

Note that these ideas target two *different* problems:
- what was the duration of the last query
- when was the last query executed

So, having both solved would be ideal.

Fair point, but since the duration solution needs to capture two timestamps anyway, it could print start time as well as duration.

The prompt timestamp could still be handy for more intricate session forensics, but I don't know if that's a common-enough use case.

Thanks,
Maciek

It's really common during migrations, and forensics.  I often do a bunch of stuff in 2 systems.  Then check the overlap.
Andrey brought up the value of 2 people separate working on things, being able to go back and review when did you change that setting? Which has happened to many of us in support sessions...

Thanks! 

pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: PATCH: Using BRIN indexes for sorted output
Next
From: Tom Lane
Date:
Subject: Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size