- Stopped the postgresql service
- Then moved pg_wal from "/var/lib/postgresql/11/main/ " to "/root/pg_xlog/archivedir"**
- Created symlink using the command "ln -s /root/pg_xlog/archivedir /var/lib/postgresql/11/main/pg_wal **"
- It created a "pg_wal->/root/pg_xlog/archivedir" under /var/lib **
- And then tried to restart the postgresql main service, its showing error not getting restarted .
- Then checked inside the log file .its shown below error like pg_wal directory not found but it is present as a pointer inside /var/lib/postgresql/11/main as shown above.
This symlink created as link for pg_wal inside /var/lib/postgresql/11/main/ for which , when tried to restart postgresql main its throwing error like
"required WAL directory "pg_wal" does not exist"
please suggest....
This would be easier to answer if you could reformat your question with the direct output from your terminal, but my suspicion is that you have a permission issue reading things under
/root/pg_xlog/archivedir
as the postgres (OS) user.As a bonus tip, pointing the active wal dir to something that looks like an archive wal dir from an older version of Postgres seems like a dangerous idea.