@@ -103,19 +103,19 @@ typedef struct Counters
103
103
int64 calls ;/* # of times executed */
104
104
double total_time ;/* total execution time, in msec */
105
105
int64 rows ;/* total # of retrieved or affected rows */
106
- int64 shared_blks_hit ;/* # of shared buffer hits */
106
+ int64 shared_blks_hit ;/* # of shared buffer hits */
107
107
int64 shared_blks_read ;/* # of shared disk blocks read */
108
108
int64 shared_blks_dirtied ;/* # of shared disk blocks dirtied */
109
109
int64 shared_blks_written ;/* # of shared disk blocks written */
110
- int64 local_blks_hit ;/* # of local buffer hits */
111
- int64 local_blks_read ;/* # of local disk blocks read */
110
+ int64 local_blks_hit ;/* # of local buffer hits */
111
+ int64 local_blks_read ;/* # of local disk blocks read */
112
112
int64 local_blks_dirtied ;/* # of local disk blocks dirtied */
113
113
int64 local_blks_written ;/* # of local disk blocks written */
114
- int64 temp_blks_read ;/* # of temp blocks read */
114
+ int64 temp_blks_read ;/* # of temp blocks read */
115
115
int64 temp_blks_written ;/* # of temp blocks written */
116
- double time_read ; /* time spent reading, in msec */
117
- double time_write ; /* time spent writing, in msec */
118
- double usage ;/* usage factor */
116
+ double blk_read_time ; /* time spent reading, in msec */
117
+ double blk_write_time ; /* time spent writing, in msec */
118
+ double usage ;/* usage factor */
119
119
}Counters ;
120
120
121
121
/*
@@ -846,10 +846,10 @@ pgss_ProcessUtility(Node *parsetree, const char *queryString,
846
846
pgBufferUsage .temp_blks_read - bufusage_start .temp_blks_read ;
847
847
bufusage .temp_blks_written =
848
848
pgBufferUsage .temp_blks_written - bufusage_start .temp_blks_written ;
849
- bufusage .time_read = pgBufferUsage .time_read ;
850
- INSTR_TIME_SUBTRACT (bufusage .time_read ,bufusage_start .time_read );
851
- bufusage .time_write = pgBufferUsage .time_write ;
852
- INSTR_TIME_SUBTRACT (bufusage .time_write ,bufusage_start .time_write );
849
+ bufusage .blk_read_time = pgBufferUsage .blk_read_time ;
850
+ INSTR_TIME_SUBTRACT (bufusage .blk_read_time ,bufusage_start .blk_read_time );
851
+ bufusage .blk_write_time = pgBufferUsage .blk_write_time ;
852
+ INSTR_TIME_SUBTRACT (bufusage .blk_write_time ,bufusage_start .blk_write_time );
853
853
854
854
/* For utility statements, we just hash the query string directly */
855
855
queryId = pgss_hash_string (queryString );
@@ -1021,8 +1021,8 @@ pgss_store(const char *query, uint32 queryId,
1021
1021
e -> counters .local_blks_written += bufusage -> local_blks_written ;
1022
1022
e -> counters .temp_blks_read += bufusage -> temp_blks_read ;
1023
1023
e -> counters .temp_blks_written += bufusage -> temp_blks_written ;
1024
- e -> counters .time_read += INSTR_TIME_GET_MILLISEC (bufusage -> time_read );
1025
- e -> counters .time_write += INSTR_TIME_GET_MILLISEC (bufusage -> time_write );
1024
+ e -> counters .blk_read_time += INSTR_TIME_GET_MILLISEC (bufusage -> blk_read_time );
1025
+ e -> counters .blk_write_time += INSTR_TIME_GET_MILLISEC (bufusage -> blk_write_time );
1026
1026
e -> counters .usage += USAGE_EXEC (total_time );
1027
1027
1028
1028
SpinLockRelease (& e -> mutex );
@@ -1163,8 +1163,8 @@ pg_stat_statements(PG_FUNCTION_ARGS)
1163
1163
values [i ++ ]= Int64GetDatumFast (tmp .temp_blks_written );
1164
1164
if (sql_supports_v1_1_counters )
1165
1165
{
1166
- values [i ++ ]= Float8GetDatumFast (tmp .time_read );
1167
- values [i ++ ]= Float8GetDatumFast (tmp .time_write );
1166
+ values [i ++ ]= Float8GetDatumFast (tmp .blk_read_time );
1167
+ values [i ++ ]= Float8GetDatumFast (tmp .blk_write_time );
1168
1168
}
1169
1169
1170
1170
Assert (i == (sql_supports_v1_1_counters ?