Thread: pgsql: Fix inconsistency in determining the timestamp of the db statfil

pgsql: Fix inconsistency in determining the timestamp of the db statfil

From
Amit Kapila
Date:
Fix inconsistency in determining the timestamp of the db statfile.

We use the timestamp of the global statfile if we are not able to
determine it for a particular database in case the entry for that database
doesn't exist. However, we were using it even when the statfile is
corrupt.

As there is no user reported issue and it is not clear if there is any
impact of this on actual application so decided not to backpatch.

Reported-by: Amit Kapila
Author: Amit Kapila
Reviewed-by: Sawada Masahiko, Magnus Hagander and Alvaro Herrera
Discussion: https://postgr.es/m/CAA4eK1J3oTJKyVq6v7K4d3jD+vtnruG9fHRib6UuWWsrwAR6Aw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/03c7f1f37a1f3bb69e348f915296af2289257e89

Modified Files
--------------
src/backend/postmaster/pgstat.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)