Thread: [BUGS] getting error could not open file "pg_xlog"
Hi,
I am working on setting up postgresql with replication using ansible. I came to a point where I perform pg_basebackup and try to start the replication node. The startup failed with the following error:
LOG: entering standby mode
cp: cannot stat ‘mnt/server/archivedir/000000010000000000000014’: No such file or directory
LOG: consistent recovery state reached at 0/14000020
LOG: redo starts at 0/14000020
LOG: record with zero length at 0/140000B8
cp: cannot stat ‘mnt/server/archivedir/000000010000000000000014’: No such file or directory
LOG: streaming replication successfully connected to primary
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
FATAL: the database system is starting up
The last line keep repeating until in the end it says:
LOG: received smart shutdown request
FATAL: terminating walreceiver process due to administrator command
LOG: shutting down
LOG: database system is shut down
LOG: database system was shut down in recovery at 2017-08-01 16:01:11 IST
Thank you,
Fazreil Amreen
On Tue, Aug 1, 2017 at 5:15 PM, Fazreil Amreen Abdul Jalil <fazreilamreen.abduljalil@openet.com> wrote: > I am working on setting up postgresql with replication using ansible. I came > to a point where I perform pg_basebackup and try to start the replication > node. The startup failed with the following error: > > cp: cannot stat ‘mnt/server/archivedir/000000010000000000000014’: No such > file or directory I suspect that you forgot the first slash character '/' on your restore_command in recovery.conf, to use /mnt/server/archivedir/ as archive path. Note that Postgres backend processes are started from PGDATA by default, so this is looking for archives within the data folder of the server. -- Michael -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs