[devtools] add has_cache for postgres (closes #5739624) [applied]