vacuumdb: could not connect to database postgres: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Can you please help me on this?
Try using the server's name rather than "localhost" or the default, for example:
psql -U postgres -h myservername
If that works, it means your pg_hba.conf isn't configured correctly for "localhost".