postgresql/src
Tom Lane fb7ed3889f 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
..
backend Fix miserable coding in pg_stat_get_activity(). 2016-09-10 13:49:04 -04:00
bin Update Windows timezone mapping from Windows 7 and 10 2016-08-18 15:35:26 +02:00
common Unlink static libraries before rebuilding them. 2015-03-01 13:06:33 -05:00
include Fix improper repetition of previous results from a hashed aggregate. 2016-08-24 14:37:51 -04:00
interfaces Remove bogus dependencies on NUMERIC_MAX_PRECISION. 2016-08-14 15:06:01 -04:00
makefiles Consolidate makefile code for setting top_srcdir, srcdir and VPATH. 2015-07-30 20:49:22 -04:00
pl Translation updates 2016-08-08 10:58:04 -04:00
port Suppress GCC 6 warning about self-comparison 2016-09-01 12:48:06 -04:00
template AIX: Test the -qlonglong option before use. 2015-07-17 03:01:35 -04:00
test Fix locking a tuple updated by an aborted (sub)transaction 2016-09-09 15:54:29 -03:00
timezone Add regression test coverage for non-default timezone abbreviation sets. 2016-09-04 20:02:16 -04:00
tools Remove vestigial references to "zic" in favor of "IANA database". 2016-09-04 19:42:34 -04:00
tutorial pgindent run for 9.4 2014-05-06 12:12:18 -04:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Create libpgcommon, and move pg_malloc et al to it 2013-02-12 11:21:05 -03:00
Makefile.global.in Back-patch fixes to make TAP tests work on Windows. 2015-11-17 14:10:24 -05:00
Makefile.shlib Make the AIX case of Makefile.shlib safe for parallel make. 2016-07-23 20:30:44 -04:00
nls-global.mk nls-global.mk: search build dir for source files, too 2016-06-07 18:55:18 -04:00
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00