diff options
author | Amit Kapila <akapila@postgresql.org> | 2020-04-13 15:31:16 +0530 |
---|---|---|
committer | Amit Kapila <akapila@postgresql.org> | 2020-04-13 15:31:16 +0530 |
commit | ef08ca113fe302b9ddf298964756eadcd41e77a1 (patch) | |
tree | f3c297266d3d06544fea93ba6ac9ca9ba0f06778 /contrib/pg_stat_statements/pg_stat_statements.c | |
parent | 0c620a5803afbb667da7ac4bcc91b245a214a80c (diff) | |
download | postgresql-ef08ca113fe302b9ddf298964756eadcd41e77a1.tar.gz postgresql-ef08ca113fe302b9ddf298964756eadcd41e77a1.zip |
Cosmetic fixups for WAL usage work.
Reported-by: Justin Pryzby and Euler Taveira
Author: Justin Pryzby and Julien Rouhaud
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CAB-hujrP8ZfUkvL5OYETipQwA=e3n7oqHFU=4ZLxWS_Cza3kQQ@mail.gmail.com
Diffstat (limited to 'contrib/pg_stat_statements/pg_stat_statements.c')
-rw-r--r-- | contrib/pg_stat_statements/pg_stat_statements.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 04abdab9044..90bc6fd0135 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -189,7 +189,7 @@ typedef struct Counters double blk_write_time; /* time spent writing, in msec */ double usage; /* usage factor */ int64 wal_records; /* # of WAL records generated */ - int64 wal_num_fpw; /* # of WAL full page image records generated */ + int64 wal_fpw; /* # of WAL full page writes generated */ uint64 wal_bytes; /* total amount of WAL bytes generated */ } Counters; @@ -1432,7 +1432,7 @@ pgss_store(const char *query, uint64 queryId, e->counters.blk_write_time += INSTR_TIME_GET_MILLISEC(bufusage->blk_write_time); e->counters.usage += USAGE_EXEC(total_time); e->counters.wal_records += walusage->wal_records; - e->counters.wal_num_fpw += walusage->wal_num_fpw; + e->counters.wal_fpw += walusage->wal_fpw; e->counters.wal_bytes += walusage->wal_bytes; SpinLockRelease(&e->mutex); @@ -1824,7 +1824,7 @@ pg_stat_statements_internal(FunctionCallInfo fcinfo, Datum wal_bytes; values[i++] = Int64GetDatumFast(tmp.wal_records); - values[i++] = Int64GetDatumFast(tmp.wal_num_fpw); + values[i++] = Int64GetDatumFast(tmp.wal_fpw); snprintf(buf, sizeof buf, UINT64_FORMAT, tmp.wal_bytes); |