Re: [PATCH] Add last_executed timestamp to pg_stat_statements - Mailing list pgsql-hackers

From Christoph Berg
Subject Re: [PATCH] Add last_executed timestamp to pg_stat_statements
Date
Msg-id aYXcteoB-JSqP4m9@msg.df7cb.de
Whole thread Raw
In response to Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements  ("Pavlo Golub" <pavlo.golub@cybertec.at>)
Responses Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements
Re: [PATCH] Add last_executed timestamp to pg_stat_statements
List pgsql-hackers
Re: Pavlo Golub
> If we do
> 
>   WHERE last_execution_start + max_exec_time * INTERVAL '1 ms' > NOW() -
> polling_interval

Is this extra complexity worth one saved GetCurrentTimestamp()?

src/backend/access/transam/xact.c is calling GetCurrentTimestamp a
lot already, so I don't really buy the argument it should be avoided
at all cost in pg_stat_statements. Just storing the statement end time
would make this use case much nicer.

Christoph



pgsql-hackers by date:

Previous
From: "Pavlo Golub"
Date:
Subject: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements
Next
From: "Matheus Alcantara"
Date:
Subject: Re: Show expression of virtual columns in error messages