Saint Petersburg: What happens when you upgrade a full warehouse?
As with your first option, you keep the extra card but your hand limit goes back to normal.

This is covered in these rules in the special cards description (which I think isn't part of the main rules book but is an extra rules reminder sheet):


  The player can have up to 4 cards in his hand. If the player upgrades the warehouse, he need not immediately reduce his hand to 3 cards.