So I started process again and now I'm having the following issue.
[postgres@xxx data]$ cd /usr/pgsql-13/bin
[postgres@xxx bin]$ ./initdb -D /opt/apm/pgsql/13/data
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
fixing permissions on existing directory /opt/apm/pgsql/13/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... America/New_York
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.
Success. You can now start the database server using:
./pg_ctl -D /opt/apm/pgsql/13/data -l logfile start
[root@xxx bin]# sudo systemctl start postgresql-13
Job for postgresql-13.service failed because the control process exited with error code.
See "systemctl status postgresql-13.service" and "journalctl -xe" for details.
Release : 10.7.0
Found this doc that may help https://unix.stackexchange.com/questions/294926/unable-to-start-posgtresql-the-reason-isnt-clear
Also provide output for See "systemctl status postgresql-13.service" and "journalctl -xe" for details.
So I edited file /etc/systemd/system/postgresql-13.service where it was showing the following before I edited it.
# Location of database directory
Environment=PGDATA=/var/lib/pgsql/13/data/
[root@jtcqa1lapmom01 system]# sudo systemctl status postgresql-13
Loaded: loaded (/etc/systemd/system/postgresql-13.service; disabled; vendor preset: disabled)
Active: active (running) since Mon 2023-03-13 16:28:02 EDT; 9s ago
Docs: https://www.postgresql.org/docs/13/static/
Process: 247878 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Main PID: 247884 (postmaster)
Tasks: 8 (limit: 100896)
Memory: 16.8M
CGroup: /system.slice/postgresql-13.service
├─247884 /usr/pgsql-13/bin/postmaster -D /opt/apm/pgsql/13/data/
├─247885 postgres: logger
├─247887 postgres: checkpointer
├─247888 postgres: background writer
├─247889 postgres: walwriter
├─247890 postgres: autovacuum launcher
├─247891 postgres: stats collector
└─247892 postgres: logical replication launcher
Customer was not installing at root. Was using /var (no diskspace) instead of /opt.