pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: hubert depesz lubaczewski <depesz@depesz.com>
To: BeginnerC <chuxuec@outlook.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: [BeginnerQuestion]Why these is 6 rows in my SELECT statement?
Date: Thu, 8 Sep 2022 14:41:29 +0200
Message-ID: <Yxni+enKv4qxfsn6@depesz.com> (raw)
In-Reply-To: <TYAP286MB063680EB7BB92F95F170FA65A9409@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>
References: <TYAP286MB063680EB7BB92F95F170FA65A9409@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM>

On Thu, Sep 08, 2022 at 04:37:00PM +0800, BeginnerC wrote:
> Hello community,
> I am checking my pg_stat_activity view,but something confused me.
> Just like this:
> 
> postgres=# SELECT wait_event_type, wait_event FROM pg_stat_activity;
> wait_event_type |     wait_event
> -----------------+---------------------
> Activity        | AutoVacuumMain
> Activity        | LogicalLauncherMain
>                 |
> Activity        | BgWriterHibernate
> Activity        | CheckpointerMain
> Activity        | WalWriterMain
> (6 rows)
> 
> As you can see, the third row is empty,but I don't know why.
> Can anyone provide some solution to me?
> Thanks in advance!

Please do:

\pset null '-- null --'
SELECT wait_event_type, wait_event FROM pg_stat_activity;

it will most likely show -- null -- in these fields. which means values
in these columns are null.SELECT wait_event_type, wait_event FROM
pg_stat_activity;

You can find more about this/these backends by doing:

select * from pg_stat_activity where wait_event_type is null \gx

depesz





view thread (3+ messages)

Message-ID: <Yxni+enKv4qxfsn6@depesz.com>
Permalink:  ../Yxni+enKv4qxfsn6@depesz.com/
Also on:    postgresql.org/message-id/Yxni+enKv4qxfsn6@depesz.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: depesz@depesz.com, chuxuec@outlook.com
  Subject: Re: [BeginnerQuestion]Why these is 6 rows in my SELECT statement?
  In-Reply-To: <Yxni+enKv4qxfsn6@depesz.com>
  References: <TYAP286MB063680EB7BB92F95F170FA65A9409@TYAP286MB0636.JPNP286.PROD.OUTLOOK.COM> <Yxni+enKv4qxfsn6@depesz.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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