In this episode, Sam recalls that Frasier had told him that his dad was a dead research scientist (which had happened in an episode of Cheers (1982) years earlier). This inconsistency is explained by Frasier saying that he and Martin had a fight before Frasier made that statement to Sam.
When Sam says that when the preacher said "Will you take this woman to be your wife?" and Sam says "Who, me?" and starts running down the isle, this is most likely a reference to the season 4 premier of Cheers when Frasier tells Sam that Diane said the same thing at their wedding.