Null database entry in pg_stat_database on pg-12 version - Mailing list pgsql-general

From RAJAMOHAN
Subject Null database entry in pg_stat_database on pg-12 version
Date
Msg-id CAFzdntvF5DDTvoEMYGxQMDXQQC1M1UF4LtDrS0SOFp5RVTOLKw@mail.gmail.com
Whole thread Raw
Responses Re: Null database entry in pg_stat_database on pg-12 version
List 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

pgsql-general by date:

Previous
From: Michael Lewis
Date:
Subject: Re: ON CONFLICT DO NOTHING ignored on bulk insert
Next
From: Magnus Hagander
Date:
Subject: Re: Null database entry in pg_stat_database on pg-12 version