aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/basebackup.c
diff options
context:
space:
mode:
authorMagnus Hagander <magnus@hagander.net>2019-04-12 14:04:50 +0200
committerMagnus Hagander <magnus@hagander.net>2019-04-12 14:04:50 +0200
commit77bd49adba4711b4497e7e39a5ec3a9812cbd52a (patch)
treed3c6d62589617760429da962e80f30efa9fc52d2 /src/backend/replication/basebackup.c
parentef6f30fe77af69a8c775cca82bf993b10c9889ee (diff)
downloadpostgresql-77bd49adba4711b4497e7e39a5ec3a9812cbd52a.tar.gz
postgresql-77bd49adba4711b4497e7e39a5ec3a9812cbd52a.zip
Show shared object statistics in pg_stat_database
This adds a row to the pg_stat_database view with datoid 0 and datname NULL for those objects that are not in a database. This was added particularly for checksums, but we were already tracking more satistics for these objects, just not returning it. Also add a checksum_last_failure column that holds the timestamptz of the last checksum failure that occurred in a database (or in a non-dataabase file), if any. Author: Julien Rouhaud <rjuju123@gmail.com>
Diffstat (limited to 'src/backend/replication/basebackup.c')
-rw-r--r--src/backend/replication/basebackup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/replication/basebackup.c b/src/backend/replication/basebackup.c
index 537f09e3429..36dcb287540 100644
--- a/src/backend/replication/basebackup.c
+++ b/src/backend/replication/basebackup.c
@@ -1584,9 +1584,9 @@ sendFile(const char *readfilename, const char *tarfilename, struct stat *statbuf
(errmsg("file \"%s\" has a total of %d checksum verification "
"failures", readfilename, checksum_failures)));
- if (dboid != InvalidOid)
- pgstat_report_checksum_failures_in_db(dboid, checksum_failures);
+ pgstat_report_checksum_failures_in_db(dboid, checksum_failures);
}
+
total_checksum_failures += checksum_failures;
return true;