Most people where we are in North West Italy make their own Pesto - it's a speciality in Liguria (Western coast line). The best basil I've ever had is from there. Having said that, there seem to have been several occasions on DC where people have questioned how long the keeping time is, and the same on It.Hobby. Cucina, the cookery newsgroup I subscribe to in Italy. There was a thread on one occasion when subscribers debated this topic, and I posted items of that debate on to you. The view taken was once the jar was open, use it, don't keep made or bought pesto for too long because of the risk of botulism, so prepare your basil and freeze it when it's in season, and when it comes to serving it, add the cheeses (Parmesan and pecorino romano) when you serve it. Otherwise, make it absolutely fresh the day you want to serve it.
It works every time. You may be able to find the thread, but I wouldn't, because I'm lousy on the computer!
Enough is never as good as a feast Oscar Wilde