From: Ian Barwick <ian.barwick@2ndquadrant.com>
To: Hong Yao <yahoon1982@gmail.com>
To: pgsql-admin@lists.postgresql.org
Subject: Re: many "cp: cannot stat xxx No such file or directory" logs in warm standby
Date: Mon, 28 Sep 2020 14:28:55 +0900
Message-ID: <c7b798ef-6b6c-554a-8e01-331e6a47acb4@2ndquadrant.com> (raw)
In-Reply-To: <CAFg3ZkVB7q6uo5qGmsimSN=NHATKoh9bjUvSL-OYwe0dBXuuBw@mail.gmail.com>
References: <CAFg3ZkVB7q6uo5qGmsimSN=NHATKoh9bjUvSL-OYwe0dBXuuBw@mail.gmail.com>
On 2020/09/28 14:12, Hong Yao wrote:
> Hi all
>
> I am setting up a standby server for my PG-12.4 primary server, following the doc https://www.postgresql.org/docs/12/warm-standby.html#STANDBY-SERVER-SETUP (26.2.4. Setting Up a Standby Server"
> The OSes are CentOS-7.8
>
> The steps on the standby:
(...)
> * set restore command in postgresql.conf
> o / restore_command = 'cp /var/pg_wal_archive/%f %p' /
> o / archive_cleanup_command = 'pg_archivecleanup /var/pg_wal_archive %r'/
(...)
> But in the standalone logs, i see following errors keep repeating:
>
> /cp: cannot stat ‘/var/pg_wal_archive/000000020000000000000014’: No such file or directory/
> /cp: cannot stat ‘/var/pg_wal_archive/00000003.history’: No such file or directory/
This is expected, as PostgreSQL is speculatively looking for files which may have
arrived since the last check.
Per the documentation [1]:
"The command will be asked for file names that are not present in the archive"
[1] https://www.postgresql.org/docs/current//runtime-config-wal.html#GUC-RESTORE-COMMAND
Regards
Ian Barwick
--
Ian Barwick https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: ian.barwick@2ndquadrant.com, yahoon1982@gmail.com, pgsql-admin@lists.postgresql.org
Subject: Re: many "cp: cannot stat xxx No such file or directory" logs in warm standby
In-Reply-To: <c7b798ef-6b6c-554a-8e01-331e6a47acb4@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox