I have gone through the steps in https://hevodata.com/learn/postgres-wal-replication/ to setup postgres replication between two servers. After rebooting of secondary server, I am getting following error
systemctl status postgresql.service
● postgresql.service – PostgreSQL database server
Loaded: loaded (/usr/lib/systemd/system/postgresql.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2024-05-03 17:53:56 PDT; 17s ago
Process: 10023 ExecStart=/usr/bin/postmaster -D ${PGDATA} (code=exited, status=1/FAILURE)
Process: 10020 ExecStartPre=/usr/libexec/postgresql-check-db-dir postgresql (code=exited, status=0/SUCCESS)
Main PID: 10023 (code=exited, status=1/FAILURE)
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.278 PDT [10023] LOG: listening on IPv6 address “::1”, port 5432
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.278 PDT [10023] LOG: listening on IPv4 address “127.0.0.1”, port 5432
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.279 PDT [10023] LOG: listening on Unix socket “/var/run/postgresql/.s.PGSQL.5432”
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.282 PDT [10023] LOG: listening on Unix socket “/tmp/.s.PGSQL.5432”
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.296 PDT [10023] LOG: redirecting log output to logging collector process
May 03 17:53:56 hostname postmaster[10023]: 2024-05-03 17:53:56.296 PDT [10023] HINT: Future log output will appear in directory “log”.
May 03 17:53:56 hostname systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
May 03 17:53:56 hostname systemd[1]: postgresql.service: Killing process 10024 (postmaster) with signal SIGKILL.
May 03 17:53:56 hostname systemd[1]: postgresql.service: Failed with result ‘exit-code’.
May 03 17:53:56 hostname systemd[1]: Failed to start PostgreSQL database server.
I am new to postgres, I need some guidance on what to look for and what configuration file is causing the issue
Thank you