I feel like the foot traffic is slow on Unix&Linux, so I'm also posting this question here:
I have a Postgres installed in CentOS, along with Node and React with NGINX.  I've left alone my Unix postgres account to be without a password as recommended here.  I've also written migrations with postgrator, which creates a table as blog_user in the blog_database.
My blog_user has LOGIN attribute with encrypted password, and the database blog_database is owned by postgres.
When I run my migrations in CentOS, I get this message
[joseph@vultr backend]$ yarn run migrate
yarn run v1.17.3
$ postgrator --config postgrator-config.js
[2:41:39 AM] table schemaversion does not exist - creating it.
[2:41:39 AM] version of database is: 0
[2:41:39 AM] migrating up to 2
Error: Ident authentication failed for user "blog_user"
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
When attempting to change peer to md5 for all, I am required to put in a password for postgres
-bash-4.2$ vim /var/lib/pgsql/11/data/pg_hba.conf 
-bash-4.2$ sudo systemctl restart postgresql.service
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.
[sudo] password for postgres: 
Sorry, try again.
Executing the restart command as root leads to this message
[root@vultr ~]# vim /var/lib/pgsql/11/data/pg_hba.conf 
[root@vultr ~]# systemctl restart postgresql.service
Failed to restart postgresql.service: Unit not found.
I'm not sure what I need to do to solve this.
 
    