Whether the treatment is conventional root canal therapy or surgical endodontics, root canal treatment doesn't cause pain, it relieves it !
Endodontic procedures are generally painless because local anesthetics, nitrous oxide and/or sedatives are used to eliminate nerve sensitivity. In most cases, an endodontic procedure is no less traumatic than a conventional filling.
Any mild discomfort you may feel following an endodontic procedure can be minimized or eliminated by over-the-counter analgesics. If pain or undue pressure persists after a week or so, you should contact your endodontist.