In the limited research that I've done about Bay Area real estate, you're best off selling the Tracy home while prices are high, because the schools in Tracy aren't great.
There is likely a minor market correction coming but you could see a lot of the homes lose 20-40% of their value in places like Tracy. The homes that will retain most of their value will be the ones with really stellar schools (9+ on greatschools.org or higher) because there's always demand for them. They won't correct much beyond 10-15% at the most.
If you're dead set on buying, I would go with Pleasanton if you can afford it. Solid schools, and a somewhat reasonable BART commute into the city. Otherwise just save your cash until you can drop $1 mil into a house.