Skip to content

Commit 809e7e2

Browse files
committed
Converge all SQL-level statistics timing values to float8 milliseconds.
This patch adjusts the core statistics views to match the decision already taken for pg_stat_statements, that values representing elapsed time should be represented as float8 and measured in milliseconds. By using float8, we are no longer tied to a specific maximum precision of timing data. (Internally, it's still microseconds, but we could now change that without needing changes at the SQL level.) The columns affected are pg_stat_bgwriter.checkpoint_write_time pg_stat_bgwriter.checkpoint_sync_time pg_stat_database.blk_read_time pg_stat_database.blk_write_time pg_stat_user_functions.total_time pg_stat_user_functions.self_time pg_stat_xact_user_functions.total_time pg_stat_xact_user_functions.self_time The first four of these are new in 9.2, so there is no compatibility issue from changing them. The others require a release note comment that they are now double precision (and can show a fractional part) rather than bigint as before; also their underlying statistics functions now match the column definitions, instead of returning bigint microseconds.
1 parent 26471a5 commit 809e7e2

File tree

9 files changed

+80
-78
lines changed

9 files changed

+80
-78
lines changed

doc/src/sgml/monitoring.sgml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -665,15 +665,15 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
665665
</row>
666666
<row>
667667
<entry><structfield>checkpoint_write_time</></entry>
668-
<entry><type>bigint</type></entry>
668+
<entry><type>double precision</type></entry>
669669
<entry>
670670
Total amount of time that has been spent in the portion of
671671
checkpoint processing where files are written to disk, in milliseconds
672672
</entry>
673673
</row>
674674
<row>
675675
<entry><structfield>checkpoint_sync_time</></entry>
676-
<entry><type>bigint</type></entry>
676+
<entry><type>double precision</type></entry>
677677
<entry>
678678
Total amount of time that has been spent in the portion of
679679
checkpoint processing where files are synchronized to disk, in
@@ -840,13 +840,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
840840
</row>
841841
<row>
842842
<entry><structfield>blk_read_time</></entry>
843-
<entry><type>bigint</></entry>
843+
<entry><type>double precision</></entry>
844844
<entry>Time spent reading data file blocks by backends in this database,
845845
in milliseconds</entry>
846846
</row>
847847
<row>
848848
<entry><structfield>blk_write_time</></entry>
849-
<entry><type>bigint</></entry>
849+
<entry><type>double precision</></entry>
850850
<entry>Time spent writing data file blocks by backends in this database,
851851
in milliseconds</entry>
852852
</row>
@@ -1318,13 +1318,13 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
13181318
</row>
13191319
<row>
13201320
<entry><structfield>total_time</></entry>
1321-
<entry><type>bigint</></entry>
1321+
<entry><type>double precision</></entry>
13221322
<entry>Total time spent in this function and all other functions
13231323
called by it, in milliseconds</entry>
13241324
</row>
13251325
<row>
13261326
<entry><structfield>self_time</></entry>
1327-
<entry><type>bigint</></entry>
1327+
<entry><type>double precision</></entry>
13281328
<entry>Total time spent in this function itself, not including
13291329
other functions called by it, in milliseconds</entry>
13301330
</row>
@@ -1534,8 +1534,6 @@ postgres: <replaceable>user</> <replaceable>database</> <replaceable>host</> <re
15341534
The functions for per-function statistics take a function OID.
15351535
Note that only tables, indexes, and functions in the current database
15361536
can be seen with these functions.
1537-
It should also be noted that while the views present timing values in
1538-
milliseconds, the underlying functions report timings in microseconds.
15391537
</para>
15401538

15411539
<para>

src/backend/access/transam/xlog.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7511,7 +7511,6 @@ LogCheckpointEnd(bool restartpoint)
75117511

75127512
CheckpointStats.ckpt_end_t = GetCurrentTimestamp();
75137513

7514-
75157514
TimestampDifference(CheckpointStats.ckpt_write_t,
75167515
CheckpointStats.ckpt_sync_t,
75177516
&write_secs, &write_usecs);
@@ -7520,7 +7519,7 @@ LogCheckpointEnd(bool restartpoint)
75207519
CheckpointStats.ckpt_sync_end_t,
75217520
&sync_secs, &sync_usecs);
75227521

7523-
/* Record checkpoint timing summary data. */
7522+
/* Accumulate checkpoint timing summary data, in milliseconds. */
75247523
BgWriterStats.m_checkpoint_write_time +=
75257524
write_secs * 1000 + write_usecs / 1000;
75267525
BgWriterStats.m_checkpoint_sync_time +=

src/backend/catalog/system_views.sql

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ CREATE VIEW pg_stat_database AS
604604
pg_stat_get_db_temp_files(D.oid) AS temp_files,
605605
pg_stat_get_db_temp_bytes(D.oid) AS temp_bytes,
606606
pg_stat_get_db_deadlocks(D.oid) AS deadlocks,
607-
pg_stat_get_db_blk_read_time(D.oid) / 1000 AS blk_read_time,
608-
pg_stat_get_db_blk_write_time(D.oid) / 1000 AS blk_write_time,
607+
pg_stat_get_db_blk_read_time(D.oid) AS blk_read_time,
608+
pg_stat_get_db_blk_write_time(D.oid) AS blk_write_time,
609609
pg_stat_get_db_stat_reset_time(D.oid) AS stats_reset
610610
FROM pg_database D;
611611

@@ -626,8 +626,8 @@ CREATE VIEW pg_stat_user_functions AS
626626
N.nspname AS schemaname,
627627
P.proname AS funcname,
628628
pg_stat_get_function_calls(P.oid) AS calls,
629-
pg_stat_get_function_time(P.oid) / 1000 AS total_time,
630-
pg_stat_get_function_self_time(P.oid) / 1000 AS self_time
629+
pg_stat_get_function_total_time(P.oid) AS total_time,
630+
pg_stat_get_function_self_time(P.oid) AS self_time
631631
FROM pg_proc P LEFT JOIN pg_namespace N ON (N.oid = P.pronamespace)
632632
WHERE P.prolang != 12 -- fast check to eliminate built-in functions
633633
AND pg_stat_get_function_calls(P.oid) IS NOT NULL;
@@ -638,8 +638,8 @@ CREATE VIEW pg_stat_xact_user_functions AS
638638
N.nspname AS schemaname,
639639
P.proname AS funcname,
640640
pg_stat_get_xact_function_calls(P.oid) AS calls,
641-
pg_stat_get_xact_function_time(P.oid) / 1000 AS total_time,
642-
pg_stat_get_xact_function_self_time(P.oid) / 1000 AS self_time
641+
pg_stat_get_xact_function_total_time(P.oid) AS total_time,
642+
pg_stat_get_xact_function_self_time(P.oid) AS self_time
643643
FROM pg_proc P LEFT JOIN pg_namespace N ON (N.oid = P.pronamespace)
644644
WHERE P.prolang != 12 -- fast check to eliminate built-in functions
645645
AND pg_stat_get_xact_function_calls(P.oid) IS NOT NULL;

src/backend/postmaster/pgstat.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -848,8 +848,8 @@ pgstat_send_funcstats(void)
848848
m_ent = &msg.m_entry[msg.m_nentries];
849849
m_ent->f_id = entry->f_id;
850850
m_ent->f_numcalls = entry->f_counts.f_numcalls;
851-
m_ent->f_time = INSTR_TIME_GET_MICROSEC(entry->f_counts.f_time);
852-
m_ent->f_time_self = INSTR_TIME_GET_MICROSEC(entry->f_counts.f_time_self);
851+
m_ent->f_total_time = INSTR_TIME_GET_MICROSEC(entry->f_counts.f_total_time);
852+
m_ent->f_self_time = INSTR_TIME_GET_MICROSEC(entry->f_counts.f_self_time);
853853

854854
if (++msg.m_nentries >= PGSTAT_NUM_FUNCENTRIES)
855855
{
@@ -1467,7 +1467,7 @@ pgstat_init_function_usage(FunctionCallInfoData *fcinfo,
14671467
fcu->fs = &htabent->f_counts;
14681468

14691469
/* save stats for this function, later used to compensate for recursion */
1470-
fcu->save_f_time = htabent->f_counts.f_time;
1470+
fcu->save_f_total_time = htabent->f_counts.f_total_time;
14711471

14721472
/* save current backend-wide total time */
14731473
fcu->save_total = total_func_time;
@@ -1528,19 +1528,19 @@ pgstat_end_function_usage(PgStat_FunctionCallUsage *fcu, bool finalize)
15281528
INSTR_TIME_ADD(total_func_time, f_self);
15291529

15301530
/*
1531-
* Compute the new total f_time as the total elapsed time added to the
1532-
* pre-call value of f_time. This is necessary to avoid double-counting
1533-
* any time taken by recursive calls of myself. (We do not need any
1534-
* similar kluge for self time, since that already excludes any recursive
1535-
* calls.)
1531+
* Compute the new f_total_time as the total elapsed time added to the
1532+
* pre-call value of f_total_time. This is necessary to avoid
1533+
* double-counting any time taken by recursive calls of myself. (We do
1534+
* not need any similar kluge for self time, since that already excludes
1535+
* any recursive calls.)
15361536
*/
1537-
INSTR_TIME_ADD(f_total, fcu->save_f_time);
1537+
INSTR_TIME_ADD(f_total, fcu->save_f_total_time);
15381538

15391539
/* update counters in function stats table */
15401540
if (finalize)
15411541
fs->f_numcalls++;
1542-
fs->f_time = f_total;
1543-
INSTR_TIME_ADD(fs->f_time_self, f_self);
1542+
fs->f_total_time = f_total;
1543+
INSTR_TIME_ADD(fs->f_self_time, f_self);
15441544

15451545
/* indicate that we have something to send */
15461546
have_function_stats = true;
@@ -4573,17 +4573,17 @@ pgstat_recv_funcstat(PgStat_MsgFuncstat *msg, int len)
45734573
* we just got.
45744574
*/
45754575
funcentry->f_numcalls = funcmsg->f_numcalls;
4576-
funcentry->f_time = funcmsg->f_time;
4577-
funcentry->f_time_self = funcmsg->f_time_self;
4576+
funcentry->f_total_time = funcmsg->f_total_time;
4577+
funcentry->f_self_time = funcmsg->f_self_time;
45784578
}
45794579
else
45804580
{
45814581
/*
45824582
* Otherwise add the values to the existing entry.
45834583
*/
45844584
funcentry->f_numcalls += funcmsg->f_numcalls;
4585-
funcentry->f_time += funcmsg->f_time;
4586-
funcentry->f_time_self += funcmsg->f_time_self;
4585+
funcentry->f_total_time += funcmsg->f_total_time;
4586+
funcentry->f_self_time += funcmsg->f_self_time;
45874587
}
45884588
}
45894589
}

src/backend/utils/adt/pgstatfuncs.c

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extern Datum pg_stat_get_analyze_count(PG_FUNCTION_ARGS);
4545
extern Datum pg_stat_get_autoanalyze_count(PG_FUNCTION_ARGS);
4646

4747
extern Datum pg_stat_get_function_calls(PG_FUNCTION_ARGS);
48-
extern Datum pg_stat_get_function_time(PG_FUNCTION_ARGS);
48+
extern Datum pg_stat_get_function_total_time(PG_FUNCTION_ARGS);
4949
extern Datum pg_stat_get_function_self_time(PG_FUNCTION_ARGS);
5050

5151
extern Datum pg_stat_get_backend_idset(PG_FUNCTION_ARGS);
@@ -108,7 +108,7 @@ extern Datum pg_stat_get_xact_blocks_fetched(PG_FUNCTION_ARGS);
108108
extern Datum pg_stat_get_xact_blocks_hit(PG_FUNCTION_ARGS);
109109

110110
extern Datum pg_stat_get_xact_function_calls(PG_FUNCTION_ARGS);
111-
extern Datum pg_stat_get_xact_function_time(PG_FUNCTION_ARGS);
111+
extern Datum pg_stat_get_xact_function_total_time(PG_FUNCTION_ARGS);
112112
extern Datum pg_stat_get_xact_function_self_time(PG_FUNCTION_ARGS);
113113

114114
extern Datum pg_stat_clear_snapshot(PG_FUNCTION_ARGS);
@@ -439,14 +439,15 @@ pg_stat_get_function_calls(PG_FUNCTION_ARGS)
439439
}
440440

441441
Datum
442-
pg_stat_get_function_time(PG_FUNCTION_ARGS)
442+
pg_stat_get_function_total_time(PG_FUNCTION_ARGS)
443443
{
444444
Oid funcid = PG_GETARG_OID(0);
445445
PgStat_StatFuncEntry *funcentry;
446446

447447
if ((funcentry = pgstat_fetch_stat_funcentry(funcid)) == NULL)
448448
PG_RETURN_NULL();
449-
PG_RETURN_INT64(funcentry->f_time);
449+
/* convert counter from microsec to millisec for display */
450+
PG_RETURN_FLOAT8(((double) funcentry->f_total_time) / 1000.0);
450451
}
451452

452453
Datum
@@ -457,7 +458,8 @@ pg_stat_get_function_self_time(PG_FUNCTION_ARGS)
457458

458459
if ((funcentry = pgstat_fetch_stat_funcentry(funcid)) == NULL)
459460
PG_RETURN_NULL();
460-
PG_RETURN_INT64(funcentry->f_time_self);
461+
/* convert counter from microsec to millisec for display */
462+
PG_RETURN_FLOAT8(((double) funcentry->f_self_time) / 1000.0);
461463
}
462464

463465
Datum
@@ -1365,30 +1367,32 @@ Datum
13651367
pg_stat_get_db_blk_read_time(PG_FUNCTION_ARGS)
13661368
{
13671369
Oid dbid = PG_GETARG_OID(0);
1368-
int64 result;
1370+
double result;
13691371
PgStat_StatDBEntry *dbentry;
13701372

1373+
/* convert counter from microsec to millisec for display */
13711374
if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL)
13721375
result = 0;
13731376
else
1374-
result = (int64) (dbentry->n_block_read_time);
1377+
result = ((double) dbentry->n_block_read_time) / 1000.0;
13751378

1376-
PG_RETURN_INT64(result);
1379+
PG_RETURN_FLOAT8(result);
13771380
}
13781381

13791382
Datum
13801383
pg_stat_get_db_blk_write_time(PG_FUNCTION_ARGS)
13811384
{
13821385
Oid dbid = PG_GETARG_OID(0);
1383-
int64 result;
1386+
double result;
13841387
PgStat_StatDBEntry *dbentry;
13851388

1389+
/* convert counter from microsec to millisec for display */
13861390
if ((dbentry = pgstat_fetch_stat_dbentry(dbid)) == NULL)
13871391
result = 0;
13881392
else
1389-
result = (int64) (dbentry->n_block_write_time);
1393+
result = ((double) dbentry->n_block_write_time) / 1000.0;
13901394

1391-
PG_RETURN_INT64(result);
1395+
PG_RETURN_FLOAT8(result);
13921396
}
13931397

13941398
Datum
@@ -1424,13 +1428,15 @@ pg_stat_get_bgwriter_maxwritten_clean(PG_FUNCTION_ARGS)
14241428
Datum
14251429
pg_stat_get_checkpoint_write_time(PG_FUNCTION_ARGS)
14261430
{
1427-
PG_RETURN_INT64(pgstat_fetch_global()->checkpoint_write_time);
1431+
/* time is already in msec, just convert to double for presentation */
1432+
PG_RETURN_FLOAT8((double) pgstat_fetch_global()->checkpoint_write_time);
14281433
}
14291434

14301435
Datum
14311436
pg_stat_get_checkpoint_sync_time(PG_FUNCTION_ARGS)
14321437
{
1433-
PG_RETURN_INT64(pgstat_fetch_global()->checkpoint_sync_time);
1438+
/* time is already in msec, just convert to double for presentation */
1439+
PG_RETURN_FLOAT8((double) pgstat_fetch_global()->checkpoint_sync_time);
14341440
}
14351441

14361442
Datum
@@ -1622,14 +1628,14 @@ pg_stat_get_xact_function_calls(PG_FUNCTION_ARGS)
16221628
}
16231629

16241630
Datum
1625-
pg_stat_get_xact_function_time(PG_FUNCTION_ARGS)
1631+
pg_stat_get_xact_function_total_time(PG_FUNCTION_ARGS)
16261632
{
16271633
Oid funcid = PG_GETARG_OID(0);
16281634
PgStat_BackendFunctionEntry *funcentry;
16291635

16301636
if ((funcentry = find_funcstat_entry(funcid)) == NULL)
16311637
PG_RETURN_NULL();
1632-
PG_RETURN_INT64(INSTR_TIME_GET_MICROSEC(funcentry->f_counts.f_time));
1638+
PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_counts.f_total_time));
16331639
}
16341640

16351641
Datum
@@ -1640,7 +1646,7 @@ pg_stat_get_xact_function_self_time(PG_FUNCTION_ARGS)
16401646

16411647
if ((funcentry = find_funcstat_entry(funcid)) == NULL)
16421648
PG_RETURN_NULL();
1643-
PG_RETURN_INT64(INSTR_TIME_GET_MICROSEC(funcentry->f_counts.f_time_self));
1649+
PG_RETURN_FLOAT8(INSTR_TIME_GET_MILLISEC(funcentry->f_counts.f_self_time));
16441650
}
16451651

16461652

src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 201204291
56+
#define CATALOG_VERSION_NO 201204301
5757

5858
#endif

src/include/catalog/pg_proc.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2662,10 +2662,10 @@ DATA(insert OID = 3150 ( pg_stat_get_db_temp_files PGNSP PGUID 12 1 0 0 0 f f f
26622662
DESCR("statistics: number of temporary files written");
26632663
DATA(insert OID = 3151 ( pg_stat_get_db_temp_bytes PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_db_temp_bytes _null_ _null_ _null_ ));
26642664
DESCR("statistics: number of bytes in temporary files written");
2665-
DATA(insert OID = 2844 ( pg_stat_get_db_blk_read_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_db_blk_read_time _null_ _null_ _null_ ));
2666-
DESCR("statistics: block read time in microseconds");
2667-
DATA(insert OID = 2845 ( pg_stat_get_db_blk_write_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_db_blk_write_time _null_ _null_ _null_ ));
2668-
DESCR("statistics: block write time in microseconds");
2665+
DATA(insert OID = 2844 ( pg_stat_get_db_blk_read_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_db_blk_read_time _null_ _null_ _null_ ));
2666+
DESCR("statistics: block read time, in msec");
2667+
DATA(insert OID = 2845 ( pg_stat_get_db_blk_write_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_db_blk_write_time _null_ _null_ _null_ ));
2668+
DESCR("statistics: block write time, in msec");
26692669
DATA(insert OID = 2769 ( pg_stat_get_bgwriter_timed_checkpoints PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_bgwriter_timed_checkpoints _null_ _null_ _null_ ));
26702670
DESCR("statistics: number of timed checkpoints started by the bgwriter");
26712671
DATA(insert OID = 2770 ( pg_stat_get_bgwriter_requested_checkpoints PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_bgwriter_requested_checkpoints _null_ _null_ _null_ ));
@@ -2678,10 +2678,10 @@ DATA(insert OID = 2773 ( pg_stat_get_bgwriter_maxwritten_clean PGNSP PGUID 12 1
26782678
DESCR("statistics: number of times the bgwriter stopped processing when it had written too many buffers while cleaning");
26792679
DATA(insert OID = 3075 ( pg_stat_get_bgwriter_stat_reset_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 1184 "" _null_ _null_ _null_ _null_ pg_stat_get_bgwriter_stat_reset_time _null_ _null_ _null_ ));
26802680
DESCR("statistics: last reset for the bgwriter");
2681-
DATA(insert OID = 3160 ( pg_stat_get_checkpoint_write_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_checkpoint_write_time _null_ _null_ _null_ ));
2682-
DESCR("statistics: total amount of checkpoint time spent writing buffers to disk");
2683-
DATA(insert OID = 3161 ( pg_stat_get_checkpoint_sync_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_checkpoint_sync_time _null_ _null_ _null_ ));
2684-
DESCR("statistics: total amount of checkpoint time spent synchronizing buffers to disk");
2681+
DATA(insert OID = 3160 ( pg_stat_get_checkpoint_write_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 701 "" _null_ _null_ _null_ _null_ pg_stat_get_checkpoint_write_time _null_ _null_ _null_ ));
2682+
DESCR("statistics: checkpoint time spent writing buffers to disk, in msec");
2683+
DATA(insert OID = 3161 ( pg_stat_get_checkpoint_sync_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 701 "" _null_ _null_ _null_ _null_ pg_stat_get_checkpoint_sync_time _null_ _null_ _null_ ));
2684+
DESCR("statistics: checkpoint time spent synchronizing buffers to disk, in msec");
26852685
DATA(insert OID = 2775 ( pg_stat_get_buf_written_backend PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_buf_written_backend _null_ _null_ _null_ ));
26862686
DESCR("statistics: number of buffers written by backends");
26872687
DATA(insert OID = 3063 ( pg_stat_get_buf_fsync_backend PGNSP PGUID 12 1 0 0 0 f f f f t f s 0 0 20 "" _null_ _null_ _null_ _null_ pg_stat_get_buf_fsync_backend _null_ _null_ _null_ ));
@@ -2691,10 +2691,10 @@ DESCR("statistics: number of buffer allocations");
26912691

26922692
DATA(insert OID = 2978 ( pg_stat_get_function_calls PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_function_calls _null_ _null_ _null_ ));
26932693
DESCR("statistics: number of function calls");
2694-
DATA(insert OID = 2979 ( pg_stat_get_function_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_function_time _null_ _null_ _null_ ));
2695-
DESCR("statistics: execution time of function");
2696-
DATA(insert OID = 2980 ( pg_stat_get_function_self_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_function_self_time _null_ _null_ _null_ ));
2697-
DESCR("statistics: self execution time of function");
2694+
DATA(insert OID = 2979 ( pg_stat_get_function_total_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_function_total_time _null_ _null_ _null_ ));
2695+
DESCR("statistics: total execution time of function, in msec");
2696+
DATA(insert OID = 2980 ( pg_stat_get_function_self_time PGNSP PGUID 12 1 0 0 0 f f f f t f s 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_function_self_time _null_ _null_ _null_ ));
2697+
DESCR("statistics: self execution time of function, in msec");
26982698

26992699
DATA(insert OID = 3037 ( pg_stat_get_xact_numscans PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_numscans _null_ _null_ _null_ ));
27002700
DESCR("statistics: number of scans done for table/index in current transaction");
@@ -2716,10 +2716,10 @@ DATA(insert OID = 3045 ( pg_stat_get_xact_blocks_hit PGNSP PGUID 12 1 0 0 0 f
27162716
DESCR("statistics: number of blocks found in cache in current transaction");
27172717
DATA(insert OID = 3046 ( pg_stat_get_xact_function_calls PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_function_calls _null_ _null_ _null_ ));
27182718
DESCR("statistics: number of function calls in current transaction");
2719-
DATA(insert OID = 3047 ( pg_stat_get_xact_function_time PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_function_time _null_ _null_ _null_ ));
2720-
DESCR("statistics: execution time of function in current transaction");
2721-
DATA(insert OID = 3048 ( pg_stat_get_xact_function_self_time PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 20 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_function_self_time _null_ _null_ _null_ ));
2722-
DESCR("statistics: self execution time of function in current transaction");
2719+
DATA(insert OID = 3047 ( pg_stat_get_xact_function_total_time PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_function_total_time _null_ _null_ _null_ ));
2720+
DESCR("statistics: total execution time of function in current transaction, in msec");
2721+
DATA(insert OID = 3048 ( pg_stat_get_xact_function_self_time PGNSP PGUID 12 1 0 0 0 f f f f t f v 1 0 701 "26" _null_ _null_ _null_ _null_ pg_stat_get_xact_function_self_time _null_ _null_ _null_ ));
2722+
DESCR("statistics: self execution time of function in current transaction, in msec");
27232723

27242724
DATA(insert OID = 2230 ( pg_stat_clear_snapshot PGNSP PGUID 12 1 0 0 0 f f f f f f v 0 0 2278 "" _null_ _null_ _null_ _null_ pg_stat_clear_snapshot _null_ _null_ _null_ ));
27252725
DESCR("statistics: discard current transaction's statistics snapshot");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy