While MY preference is a rear derailleur with a longer cage, it may not be necessary ...
Otherwise, the parts are just the parts (+ tools, if needed) --
- the compact crankset of your choice + appropriate BB (if a different model-and-vintage of crank)
- the cassette of your choice
- BTW. I have used a 9-speed SHIMANO chain with a 10-speed Campagnolo Cassette ... so, I recommed that if you buy a new chain AND presuming you aren't planning to update to an 11-speed drivetrain, then I recommend that if you opt to replace your chain in the near future that you opt for any 9-speed Shimano chain.
FYI. Theoretically, a 39t chainring with a non-existent 31t cog is essentially the same as a 34t chainring with a 27t cog ...
So, a 29t cog may be all you need ...
MICHE cogs are avaiable separately ...
Here is a 10-speed Campagnolo Cassette which I opted to restack with a 29t Miche cog:
[CENTER] [IMG]cyclingforums.com281Open ↗[/IMG][/CENTER]
Of course, you can restack a 9-speed Cassette, too.
BTW. Three years is not, IMO, a long lay off, so presuming you have not been injured in the interim unless you moved to a hillier part of the country OR are planning rides which involve more climbing than in the past that 'I' recommend that you change one component at a time ... try before you buy, particularly if you think a 10-or-11-speed updating is planned for the future.