Re: [BeginnerQuestion]Why these is 6 rows in my SELECT statement?

From: hubert depesz lubaczewski <depesz(at)depesz(dot)com>
To: BeginnerC <chuxuec(at)outlook(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: [BeginnerQuestion]Why these is 6 rows in my SELECT statement?
Date: 2022-09-08 12:41:29
Message-ID: Yxni+enKv4qxfsn6@depesz.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Perry Smith 2022-09-09 03:05:36 WARNING: could not open statistics file "pg_stat_tmp/global.stat": Operation not permitted
Previous Message Matheus Martin 2022-09-08 10:17:54 Re: Missing query plan for auto_explain.