pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedCurrently running queries with actual arguments?
4+ messages / 3 participants
[nested] [flat]
* Currently running queries with actual arguments?
@ 2021-09-23 15:32 rihad <rihad@mail.ru>
2021-09-23 15:58 ` Re: Currently running queries with actual arguments? Garfield Lewis <garfield.lewis@lzlabs.com>
0 siblings, 1 reply; 4+ messages in thread
From: rihad @ 2021-09-23 15:32 UTC (permalink / raw)
To: pgsql-general
Hi, is it possible to view the list of currently running queries with
$1, $2 etc replaced with the actual arguments?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Currently running queries with actual arguments?
2021-09-23 15:32 Currently running queries with actual arguments? rihad <rihad@mail.ru>
@ 2021-09-23 15:58 ` Garfield Lewis <garfield.lewis@lzlabs.com>
2021-09-23 16:51 ` Re: Currently running queries with actual arguments? rihad <rihad@mail.ru>
0 siblings, 1 reply; 4+ messages in thread
From: Garfield Lewis @ 2021-09-23 15:58 UTC (permalink / raw)
To: rihad <rihad@mail.ru>; pgsql-general
The way I normally get this info is by setting the following:
log_statement = 'all'
then the arguments will be printed in the postgres.log file. There could be some other way but that is what I know.
--
Regards,
Garfield
On 2021-09-23, 11:33 AM, "rihad" <rihad@mail.ru> wrote:
Hi, is it possible to view the list of currently running queries with
$1, $2 etc replaced with the actual arguments?
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Currently running queries with actual arguments?
2021-09-23 15:32 Currently running queries with actual arguments? rihad <rihad@mail.ru>
2021-09-23 15:58 ` Re: Currently running queries with actual arguments? Garfield Lewis <garfield.lewis@lzlabs.com>
@ 2021-09-23 16:51 ` rihad <rihad@mail.ru>
2021-10-07 18:47 ` Re: Currently running queries with actual arguments? Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 4+ messages in thread
From: rihad @ 2021-09-23 16:51 UTC (permalink / raw)
To: Garfield Lewis <garfield.lewis@lzlabs.com>; pgsql-general
On 9/23/21 7:58 PM, Garfield Lewis wrote:
> The way I normally get this info is by setting the following:
>
> log_statement = 'all'
>
> then the arguments will be printed in the postgres.log file. There could be some other way but that is what I know.
>
Thanks, those queries are logged after their completion, but I
specifically need the list of unfinished long queries currently being
executed.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Currently running queries with actual arguments?
2021-09-23 15:32 Currently running queries with actual arguments? rihad <rihad@mail.ru>
2021-09-23 15:58 ` Re: Currently running queries with actual arguments? Garfield Lewis <garfield.lewis@lzlabs.com>
2021-09-23 16:51 ` Re: Currently running queries with actual arguments? rihad <rihad@mail.ru>
@ 2021-10-07 18:47 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Momjian @ 2021-10-07 18:47 UTC (permalink / raw)
To: rihad <rihad@mail.ru>; +Cc: Garfield Lewis <garfield.lewis@lzlabs.com>; pgsql-general
On Thu, Sep 23, 2021 at 08:51:49PM +0400, rihad wrote:
> On 9/23/21 7:58 PM, Garfield Lewis wrote:
> > The way I normally get this info is by setting the following:
> >
> > log_statement = 'all'
> >
> > then the arguments will be printed in the postgres.log file. There could be some other way but that is what I know.
> >
>
> Thanks, those queries are logged after their completion, but I specifically
> need the list of unfinished long queries currently being executed.
Uh, log_statement prints them before they are executed ---
log_min_duration_statment prints them after execution. You can verify
this by running:
SET log_statement = 'all';
SELECT pg_sleep(430);
and then looking in the log file.
--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EDB https://enterprisedb.com
If only the physical world exists, free will is an illusion.
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2021-10-07 18:47 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-09-23 15:32 Currently running queries with actual arguments? rihad <rihad@mail.ru>
2021-09-23 15:58 ` Garfield Lewis <garfield.lewis@lzlabs.com>
2021-09-23 16:51 ` rihad <rihad@mail.ru>
2021-10-07 18:47 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox