After a server failure I'm not able to execute psql like psql -U postgres nor like sudo -u postgres psql. In both cases I'm asked for the user password despite I've modified the pg_hba.conf files to trust all local connections and I've tried virtually all proposed solutions along the web. Would it be possible to delete the postgres user and re-create it without loosing the data? That's assuming the issue might be that the user got corrupted during the system failure.



postgresis just a string; deleting the actual Linux user account and creating another one with the same name won't change the way PostgreSQL treats that user. If you want help, you should provide more details (the entire shell session, including the error message; thepg_hba.conffile; errors logged by the Postgres server in its log file; etc.)/var/log.../var/logunfortunately.