If that is your intent I believe you will need to lease your primary residence for at least a two years for it to be considered investment property.
It might be to your advantage to just sell the SF property, buy the property in Oregon and take the tax hit at the current ordinary income tax rate.
Remember that there is an exclusion of $250,000 for a single person and $500,000 for a married person when calculating your capital gain.
And, your capital gain is the price you paid for the house less your current selling price regardless of the loans on the property.
Uncle Sam always gets his share unless you plan your moves to your advantage.
Best to talk to a tax professional and/or a financial planner for the best strategy.