Re: empty,query_id, pg_stat_activity - Mailing list pgsql-bugs

From Greg Sabino Mullane
Subject Re: empty,query_id, pg_stat_activity
Date
Msg-id CAKAnmmL=dtnV5JxmrJNM=dFnQXRb6U3ah0E=bwxSD_+iDPv=ag@mail.gmail.com
Whole thread Raw
In response to 答复: empty,query_id, pg_stat_activity  ("zhouenbing" <zhouenbing@sunwoda-evb.com>)
Responses Re: empty,query_id, pg_stat_activity
List pgsql-bugs
On Tue, Sep 2, 2025 at 10:01 PM zhouenbing <zhouenbing@sunwoda-evb.com> wrote:

No, if the query_id I provided is empty, it indicates that the statement session is in an active state, meaning the operation is ongoing


The session is active, but there is no I/O yet, as the query has arrived, but has not been parsed yet. The queryid appears right before the query actually executes, so a lack of queryid is a safe indicator that the query is not actually doing any work yet- it's still spinning up. From a performance monitoring standpoint, you should be safe to exclude rows with no queryid.

Cheers,
Greg

--
Enterprise Postgres Software Products & Tech Support

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c)
Next
From: Greg Sabino Mullane
Date:
Subject: Re: BUG #19042: Option --help not recognized at the end of command line in pg_restore