fixed postgres error with process timeout queries