Hi Neel,
As discussed, I am sending you the updated path for based on your new patch (sent personally, which included the background process integration).
Also, the COPY Statement expects the file to be present on the server OS, hence - we should be using the '\copy' command of psql to do the job.
I have modified the patch accordingly, but - I did not get a chance to test it properly, also - with some cosmetic changes.
Can you please review, and test it?