Amit, I think you can simplify this task by forgetting about parsing the .auto file entirely when writing it. That is, the .auto file should be regenerated, and should write out whatever has been set in pg_settings, regardless of what was in the file beforehand. I don't see the value in parsing the file before writing it out.
-- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers