Re: FATAL: could not receive timeline history file from the primary server: ERROR: could not open file "pg_wal/0000000x.history": No such file or directory - Mailing list pgsql-general

From Kyotaro Horiguchi
Subject Re: FATAL: could not receive timeline history file from the primary server: ERROR: could not open file "pg_wal/0000000x.history": No such file or directory
Date
Msg-id 20220609.111917.1706365234823096520.horikyota.ntt@gmail.com
Whole thread Raw
In response to FATAL: could not receive timeline history file from the primary server: ERROR: could not open file "pg_wal/0000000x.history": No such file or directory  (pgdba pgdba <postgresdba12@outlook.com>)
List pgsql-general
At Wed, 8 Jun 2022 16:43:55 +0000, pgdba pgdba <postgresdba12@outlook.com> wrote in 
> hello everyone,
> 
> I want to install a two-node streaming replication with postgresql version 11, but I'm getting this error when
startingthe service of my slave node. Can you support me? I couldn't find the solution.
 
> 
> FATAL:  could not receive timeline history file from the primary server: ERROR:  could not open file
"pg_wal/00000002.history":No such file or directory
 

It seems like that the stanby is on TLI=1 and the primary is on 2 or
greater (call it n).  In that case, at replication start, the standby
requests to the primary every history (0000000n.history) files from
TLI=2 to TLI=n if the standby doesn't have.

Thus, the message means 0000002.history has been somehow removed in
pg_wal of the primary, but I'm not sure how come it happened.

If you did remove some history files on primary, do not remove them
for between the TLIs of primary and standby.

> slave node has recovery.conf file and include primary_con_info informations.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



pgsql-general by date:

Previous
From: Ian Lawrence Barwick
Date:
Subject: Re:
Next
From: "Ma, Marcus"
Date:
Subject: Sharing DSA pointer between parallel workers after they've been created