Null database entry in pg_stat_database on pg-12 version

From: RAJAMOHAN <garajamohan(at)gmail(dot)com>
To: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Null database entry in pg_stat_database on pg-12 version
Date: 2021-05-26 07:19:31
Message-ID: CAFzdntvF5DDTvoEMYGxQMDXQQC1M1UF4LtDrS0SOFp5RVTOLKw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all,

Today I came across this null database entry with oid as 0 in
*pg_stat_database* on *postgresql-12* version.

Any particular use case is there for this? It also has some column values,
how it is gathering those data and which database is responsible for this?

I am not seeing this in the postgresql-10 version.

Can someone clarify this?

postgres=# select * from pg_catalog.pg_stat_database where datid='0';
-[ RECORD 1 ]---------+------------------------------
datid | 0
datname |
numbackends | 0
xact_commit | 0
xact_rollback | 0
blks_read | 14253
blks_hit | 1753072
tup_returned | 271673
tup_fetched | 212113
tup_inserted | 152603
tup_updated | 478
tup_deleted | 14
conflicts | 0
temp_files | 0
temp_bytes | 0
deadlocks | 0
checksum_failures |
checksum_last_failure |
blk_read_time | 0
blk_write_time | 0
stats_reset | 2021-05-24 08:36:09.580433+00

Thanks & Regards,
Rajamohan.J
Mobile : +91 8098167651, +91 7259157485

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2021-05-26 07:51:51 Re: Null database entry in pg_stat_database on pg-12 version
Previous Message Michael Lewis 2021-05-25 15:41:42 Re: ON CONFLICT DO NOTHING ignored on bulk insert