Re: Logical replication failed recovery - Mailing list pgsql-general

From Adrian Klaver
Subject Re: Logical replication failed recovery
Date
Msg-id bf4cf285-514a-b5b8-57f9-f5cb9d5124e0@aklaver.com
Whole thread Raw
In response to Logical replication failed recovery  (Lou Tseng <ltseng@advancedpricing.com>)
List pgsql-general
On 4/7/19 6:22 AM, Lou Tseng wrote:
> Hi folks,
> 
> Is there a good tutorial to recover from logical replication out of 
> sync?  We ran into this error stating WAL has been removed and now 
> replica is out of sync.  Also, is there a way to increase the number of 
> WAL kept on the master?

I have to believe there is more to the story. When a subscription is 
enabled it sets up a replication 
slot(www.postgresql.org/docs/11/warm-standby.html#STREAMING-REPLICATION-SLOTS) 
that should ensure that the WAL is not recycled until it is used. Did 
you stop a Subscription then
restart it? Or one of the other scenarios shown here?:

https://www.postgresql.org/docs/11/logical-replication-subscription.html#LOGICAL-REPLICATION-SUBSCRIPTION-SLOT

> 
> Thanks!
> 
> 2019-04-07 12:28:37.180 UTC [22292] ERROR:could not receive data from 
> WAL stream: ERROR:requested WAL segment 0000000100005208000000EB has 
> already been removed
> 
> 2019-04-07 12:28:37.182 UTC [114186] LOG:worker process: logical 
> replication worker for subscription 8907992 (PID 22292) exited with exit 
> code 1
> 
> 
> 
> Lou Tseng
> 
> ltseng@advancedpricing.com <mailto:ltseng@advancedpricing.com>
> <http://www.advancedpricing.com/>
> Advanced Medical Pricing Solutions <http://advancedpricing.com/>
> 35 Technology Parkway South, Suite. 100
> Peachtree Corners, GA 30092
> 
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com



pgsql-general by date:

Previous
From: Sherrylyn Branchaw
Date:
Subject: Re: pg_upgrade --jobs
Next
From: Adrian Klaver
Date:
Subject: Re: pg_upgrade --jobs