]> granicus.if.org Git - postgresql/commit
Fix failure to consider failure cases in GetComboCommandId().
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 26 Nov 2015 18:23:02 +0000 (13:23 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 26 Nov 2015 18:23:02 +0000 (13:23 -0500)
commitdaefb9810807709d13ce42cc0e7220d77b368be9
treeaabae3eeb887f84f027615f0a8eb8efe65feb885
parent55a2cc844216838d743cae7d94bd4f38acc62d1e
Fix failure to consider failure cases in GetComboCommandId().

Failure to initially palloc the comboCids array, or to realloc it bigger
when needed, left combocid's data structures in an inconsistent state that
would cause trouble if the top transaction continues to execute.  Noted
while examining a user complaint about the amount of memory used for this.
(There's not much we can do about that, but it does point up that repalloc
failure has a non-negligible chance of occurring here.)

In HEAD/9.5, also avoid possible invocation of memcpy() with a null pointer
in SerializeComboCIDState; cf commit 13bba0227.
src/backend/utils/time/combocid.c