All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
If one forgets a pillar (integral part of prayer) or a Rak'ah, and remembers it immediately after finishing his prayer, then he/she has to complete that prayer. So, he/she should make up the missed part of the prayer and make two prostrations of forgetfulness.
If one remembers the mistake after a long time has passed, he/she has to repeat the whole prayer.
The Muslim scholars have various opinions concerning the period when it would be considered long and when it would be considered as short.
However, it seems that the length of the period of the interruption should be fixed in compliance with the known custom at that place.
Allah knows best.