We booked tickets on
www.thetrainline.com from Santiago to Porto for September 7. While we booked the trip in one place, as others said, it is actually two train tickets. Santiago de Compostela to Vigo Guixar which is Renfe regional and then Guilxar to Porto, which is Renge intercity. So if the first train is delayed, we could miss the next train but there is an hour and ten minutes between trains, so it should go well.
The Portugues trains are either inter-city or alfa pendular. The alfa pendular trains are the faster trains. If you book on the Portuguese train site Comboios de Portugal (
www.cp.pt) in advance, the tickets are very inexpensive, for example as low as 9.5 euros from Porto to Lisbon. That's for 2nd class (turistica) and intercity. The maximum time ahead you can book is 60 days.