Hi Ravi,
You can use CREATE INDEX with CONCURRENTLY keyword. It will not lock your table during the process.
After which you would do:
ALTER TABLE tbl ADD PRIMARY KEY USING INDEX <index name from above>;
See the note on the linked page advising this exact procedure.
David J.