Tom Lane
ddc8893179
Fix miserable coding in pg_stat_get_activity().
...
Commit dd1a3bccc replaced a test on whether a subroutine returned a
null pointer with a test on whether &pointer->backendStatus was null.
This accidentally failed to fail, at least on common compilers, because
backendStatus is the first field in the struct; but it was surely trouble
waiting to happen. Commit f91feba87 then messed things up further,
changing the logic to
local_beentry = pgstat_fetch_stat_local_beentry(curr_backend);
if (!local_beentry)
continue;
beentry = &local_beentry->backendStatus;
if (!beentry)
{
where the second "if" is now dead code, so that the intended behavior of
printing a row with "<backend information not available>" cannot occur.
I suspect this is all moot because pgstat_fetch_stat_local_beentry
will never actually return null in this function's usage, but it's still
very poor coding. Repair back to 9.4 where the original problem was
introduced.
2016-09-10 13:49:04 -04:00
..
2016-07-25 22:07:44 -04:00
2016-08-23 23:21:10 -04:00
2016-08-27 17:50:38 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-08-27 17:50:38 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2015-05-20 16:56:22 +03:00
2016-01-02 13:33:40 -05:00
2016-08-16 20:33:01 -04:00
2016-09-02 17:30:02 -04:00
2016-06-09 18:02:36 -04:00
2016-08-16 16:14:16 -04:00
2016-09-09 09:20:34 -04:00
2016-01-02 13:33:40 -05:00
2016-09-05 12:59:55 -04:00
2016-06-03 18:34:05 -04:00
2016-07-14 18:45:59 -04:00
2016-01-02 13:33:40 -05:00
2016-08-08 11:12:59 -04:00
2016-01-02 13:33:40 -05:00
2016-07-16 14:42:37 -04:00
2016-01-02 13:33:40 -05:00
2016-06-09 18:02:36 -04:00
2014-05-06 12:12:18 -04:00
2016-06-16 17:16:32 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-03-15 18:06:11 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-06-09 18:02:36 -04:00
2016-08-15 13:42:51 -04:00
2016-08-27 17:50:38 -04:00
2016-01-22 11:53:06 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-03-10 12:44:09 -05:00
2014-10-21 16:16:39 -04:00
2016-08-23 15:16:30 -04:00
2016-07-14 22:48:26 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-08-23 16:25:35 -04:00
2016-09-02 13:49:59 +03:00
2016-09-03 14:18:55 -04:00
2016-04-13 07:54:45 -04:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-02-17 15:40:00 +05:30
2016-02-28 23:39:20 -05:00
2016-01-02 13:33:40 -05:00
2016-04-06 21:45:32 -04:00
2016-09-10 13:49:04 -04:00
2016-01-17 19:36:59 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-06-09 18:02:36 -04:00
2016-08-07 18:52:02 -04:00
2016-01-02 13:33:40 -05:00
2016-08-17 18:33:01 -04:00
2016-01-05 13:02:43 -05:00
2016-01-02 13:33:40 -05:00
2016-01-02 13:33:40 -05:00
2016-08-16 20:33:01 -04:00
2016-08-07 18:52:02 -04:00
2016-01-02 13:33:40 -05:00
2016-08-16 20:33:01 -04:00
2016-01-02 13:33:40 -05:00
2016-06-27 20:47:32 +03:00
2016-06-27 20:47:32 +03:00
2016-08-15 13:42:51 -04:00
2016-03-02 17:37:54 -05:00
2016-06-09 18:02:36 -04:00
2016-03-12 16:05:29 -05:00
2016-04-07 18:44:18 +03:00
2016-08-16 14:52:29 -04:00
2016-06-27 20:47:32 +03:00
2016-08-05 16:09:06 -04:00
2016-04-07 18:44:18 +03:00
2016-04-08 12:04:15 +03:00
2016-08-23 10:30:52 -04:00
2016-06-09 18:02:36 -04:00
2016-01-02 13:33:40 -05:00
2016-02-03 14:29:53 -05:00
2016-09-02 13:49:59 +03:00
2016-01-02 13:33:40 -05:00
2016-03-15 18:06:11 -04:00
2016-01-02 13:33:40 -05:00
2016-08-27 17:50:38 -04:00