Investment property includes second home and rental property.
A second home can be non-rental. You can deduct mortgage interest if the second home satisfies certian condition.
Primary residence matters when you sel the home and claim primary residence exemption.