Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGqf-0003yF-K5 for pgsql-general@arkaria.postgresql.org; Thu, 08 Sep 2022 12:41:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oWGqe-0002dt-Hn for pgsql-general@arkaria.postgresql.org; Thu, 08 Sep 2022 12:41:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGqe-0002dk-5D for pgsql-general@lists.postgresql.org; Thu, 08 Sep 2022 12:41:36 +0000 Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oWGqb-0006AY-B7 for pgsql-general@lists.postgresql.org; Thu, 08 Sep 2022 12:41:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=depesz.com; s=20170201; h=In-Reply-To:Content-Type:MIME-Version:References:Reply-To: Message-ID:Subject:Cc:To:Sender:From:Date:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=oKTpjVccRDrbTG2KUAHYq/xI4cP8PZA3k/zL0maXDLI=; b=UV5j3yLZdmN0GueqalQZghd8XG ECTlcvNZMrxrYQ0SRTAz82kSaezNxG5EVb4l6v/DEFxRne8OjptEYvrlWSa5mFNT1JbSBJv84INL4 diY6+GewBXe2p6+AzEmpQ96Em/9hGekprmPcv7OR9R7vQSJNAX6BnL4FAS7Ff+S9hQ+Y=; Received: from lana.depesz.com ([88.198.49.178] helo=depesz.com) by depesz.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oWGqY-006MPU-E2; Thu, 08 Sep 2022 14:41:30 +0200 Date: Thu, 8 Sep 2022 14:41:29 +0200 From: hubert depesz lubaczewski Sender: depesz@depesz.com To: BeginnerC Cc: pgsql-general@lists.postgresql.org Subject: Re: [BeginnerQuestion]Why these is 6 rows in my SELECT statement? Message-ID: Reply-To: depesz@depesz.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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