It is narrated from Qatadah (may Allah have mercy on him) that Sayyiduna Umar (may Allah be pleased with him) said: "In the prayer, never resist (by holding back) the discomfort caused by (the urge for) urine or stool."
Imam al-Harith recorded it in his Musnad (Bughyat al-Bahith: 493). Its chain contains a narrator named Dawud bin al-Muhabbar, who is weak; however, the meaning of this statement is fully in accordance with other authentic marfu' hadith in which praying while overcome by the call of nature is forbidden, so that humility and devotion in the prayer are not impaired.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / صفة الصلاة / 493
Hadith Gradingمحدثین:إسناده ضعيف جدًا، منقطع
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسناده ضعيف جدا الحديث إسناده شديد الضعف؛ لحال داود بن المحبر» ولأنه منقطع بين قتادة ْ وعمر رضي الله عنه» وفيه معاذ وهو مجهول. » «أورده ابن حجر فى "المطالب العالية"، 493، وأخرجه عبد الرزاق فى «مصنفه» برقم: 1762، وأخرجه ابن أبى شيبة فى «مصنفه» برقم: 8013، 8014»