Add query for heat update bug 1370865

Related-Bug: #1370865

51 failures in 48 hours, all on postgres jobs.

Change-Id: If6f1255a75d50ccf1c999232d12afdc9185a2081
Merge "Add query for heat update bug 1370865"