public inbox for [email protected]
help / color / mirror / Atom feedFrom: Sami Imseih <[email protected]>
To: Christoph Berg <[email protected]>
Cc: Pavlo Golub <[email protected]>
Cc: [email protected]
Subject: Re: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements
Date: Tue, 3 Feb 2026 20:37:31 -0600
Message-ID: <CAA5RZ0tH_+3JGMCktkp8EMyvKaRAJf-xRh+y_UoZ8azvuUEAYQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CAK7ymc+FxoVswo1ok_xDW-xPG-ZEZ8SAqCUkJ7WF04=0aQDvVQ@mail.gmail.com>
<CAA5RZ0uyvnNuHRj=73jZhocnLxE07oM-AeSLS=FUuuZ_hy7fKA@mail.gmail.com>
<[email protected]>
<CAA5RZ0u6qdcLoWJJz5mUB_VYZqT__U-HJJ5_ioYO7XGsUfXfpw@mail.gmail.com>
<[email protected]>
> > I wonder if we can use GetCurrentStatementStartTimestamp()
> > instead?
>
> The main use case for this column is being able to retrieve the stats
> that were updated since the last time one was looking. That only works
> if it's the statement end time, or else long-running statements
> spanning more than one poll interval would be missed.
Sure, I get it is not perfect for the polling use-case due to the scenario
you mention, but I don't think it will be acceptable to call
GetCurrentTimeStamp() at the end of every execution and especially
with a SpinLock held.
This will probably be worse for nested_tacking as well, due to
multiple GetCurrentTimeStamp() calls.
What do you think?
--
Sami Imseih
Amazon Web Services (AWS)
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected]
Subject: Re: Re[2]: [PATCH] Add last_executed timestamp to pg_stat_statements
In-Reply-To: <CAA5RZ0tH_+3JGMCktkp8EMyvKaRAJf-xRh+y_UoZ8azvuUEAYQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox