OSDN Git Service

Guard against incoming rowcount estimate of NaN in cost_mergejoin().
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Apr 2011 21:45:41 +0000 (17:45 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 15 Apr 2011 21:46:50 +0000 (17:46 -0400)
commit72826fb362c4aada6d2431df0b706df448806c02
tree59805e2d8e32a9ef1f7a0091e08fed960fa2008c
parentd5a7bf8c11c8b66c822bbb1a6c90e1a14425bd6e
Guard against incoming rowcount estimate of NaN in cost_mergejoin().

Although rowcount estimates really ought not be NaN, a bug elsewhere
could perhaps result in that, and that would cause Assert failure in
cost_mergejoin, which I believe to be the explanation for bug #5977 from
Anton Kuznetsov.  Seems like a good idea to expend a couple more cycles
to prevent that, even though the real bug is elsewhere.  Not back-patching,
though, because we don't encourage running production systems with
Asserts on.
src/backend/optimizer/path/costsize.c