Code review for pgstat_get_crashed_backend_activity patch.
Tom Lane <tgl@sss.pgh.pa.us>
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
| Path | Change | +/− |
|---|---|---|
| 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 |