Does recall has different interpretation when comes to classification and information retrieval
According to wikipedia, Recall is defined as-

In information retrieval, recall is the fraction of the relevant documents that are successfully retrieved.

In your second formula, recall = p/q, where q is total number of relevant documents. If you define a confusion matrix for binary classification, you will see that q is actually sum of TP and FN. And p is already (by definition) is TP.

Now lets get the definition of TP and FN. TP (True Positive) is number of predicted positive docs out of number of actual positive docs. FN (False Negative) is number of predicted negative docs out of number of actual positive docs. So, basically when you add TP and FN, it becomes total number of positive docs.

So, let say out of 50 positive (actual) docs, you get 35 positive and 15 negative predictions. So, recall by your first formula is 

$35/(35+15) = 35/50$

and by your second formula, $p = 35$ and $q = 50$, so recall is

$p/q = 35/50$

Hope this helps. Please comment if I am wrong about something or missed anything.