postgresql/src/include
Andres Freund 54b6cd589a Speedup pgstat_report_activity by moving mb-aware truncation to read side.
Previously multi-byte aware truncation was done on every
pgstat_report_activity() call - proving to be a bottleneck for
workloads with long query strings that execute quickly.

Instead move the truncation to the read side, which commonly is
executed far less frequently. That's possible because all server
encodings allow to determine the length of a multi-byte string from
the first byte.

Rename PgBackendStatus.st_activity to st_activity_raw so existing
extension users of the field break - their code has to be adjusted to
use pgstat_clip_activity().

Author: Andres Freund
Tested-By: Khuntal Ghosh
Reviewed-By: Robert Haas, Tom Lane
Discussion: https://postgr.es/m/20170912071948.pa7igbpkkkviecpz@alap3.anarazel.de
2017-09-19 12:51:14 -07:00
..
access Fix crash restart bug introduced in 8356753c21. 2017-09-18 17:25:49 -07:00
bootstrap Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
catalog Distinguish selectivity of < from <= and > from >=. 2017-09-13 11:12:39 -04:00
commands Make ExplainOpenGroup and ExplainCloseGroup public. 2017-09-18 16:01:16 -04:00
common Increase SCRAM salt length 2017-08-24 14:04:28 -04:00
datatype Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
executor Remove TupleDesc remapping logic from tqueue.c. 2017-09-14 19:59:29 -07:00
fe_utils Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
foreign Separate reinitialization of shared parallel-scan state from ExecReScan. 2017-08-30 13:18:16 -04:00
lib Remove pre-order and post-order traversal logic for red-black trees. 2017-09-10 13:19:11 -04:00
libpq Allow custom search filters to be configured for LDAP auth 2017-09-12 09:49:04 -04:00
mb Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
nodes Fix SQL-spec incompatibilities in new transition table feature. 2017-09-16 13:20:36 -04:00
optimizer Assorted preparatory refactoring for partition-wise join. 2017-08-15 12:30:38 -04:00
parser Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
port Further marginal hacking on generic atomic ops. 2017-09-07 08:50:01 -04:00
portability Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postmaster Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
regex Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
replication Update code comment for temporary replication slots 2017-08-23 14:59:25 -04:00
rewrite Teach map_partition_varattnos to handle whole-row expressions. 2017-08-03 11:21:29 -04:00
snowball Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
statistics Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
storage Add support for coordinating record typmods among parallel workers. 2017-09-14 19:59:21 -07:00
tcop Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
tsearch Fix serious performance problems in json(b) to_tsvector(). 2017-07-18 12:45:51 -04:00
utils Make DatumGetFoo/PG_GETARG_FOO/PG_RETURN_FOO macro names more consistent. 2017-09-18 15:21:23 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Remove BoolPtr type 2017-09-14 11:45:30 -04:00
fmgr.h Introduce 64-bit hash functions with a 64-bit seed. 2017-08-31 22:21:21 -04:00
funcapi.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
getaddrinfo.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
getopt_long.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
Makefile Add statistics subdirectory to Makefile. 2017-06-08 11:29:50 -04:00
miscadmin.h Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
pg_config.h.in Make [U]INT64CONST safe for use in #if conditions. 2017-09-01 15:14:46 -04:00
pg_config.h.win32 Make [U]INT64CONST safe for use in #if conditions. 2017-09-01 15:14:46 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Fix default minimum value for descending sequences 2017-01-23 14:00:58 -05:00
pg_getopt.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pg_trace.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
pgstat.h Speedup pgstat_report_activity by moving mb-aware truncation to read side. 2017-09-19 12:51:14 -07:00
pgtar.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
pgtime.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
port.h Change pg_ctl to detect server-ready by watching status in postmaster.pid. 2017-06-28 17:31:32 -04:00
postgres.h Phase 3 of pgindent updates. 2017-06-21 15:35:54 -04:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
rusagestub.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
windowapi.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00