Code review for pgstat_get_crashed_backend_activity patch.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: f9c92a5a3ead738c7de0dffa203a92b4d2fec413
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2011-10-21T20:36:04Z
Releases: 9.2.0
Code review for pgstat_get_crashed_backend_activity patch.

Avoid possibly dumping core when pgstat_track_activity_query_size has a
less-than-default value; avoid uselessly searching for the query string
of a successfully-exited backend; don't bother putting out an ERRDETAIL if
we don't have a query to show; some other minor stylistic improvements.

Files

PathChange+/−
src/backend/postmaster/pgstat.c modified +32 −22
src/backend/postmaster/postmaster.c modified +15 −10
src/backend/utils/adt/ascii.c modified +16 −13
src/include/pgstat.h modified +1 −1
src/include/utils/ascii.h modified +2 −1