Re: Allow WAL information to recover corrupted pg_controldata - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: Allow WAL information to recover corrupted pg_controldata
Date
Msg-id 002b01cd4df8$0fd6dca0$2f8495e0$@kapila@huawei.com
Whole thread Raw
In response to Re: Allow WAL information to recover corrupted pg_controldata  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> I'm almost inclined to suggest that we not get next-LSN from WAL, but
> by scanning all the pages in the main data store and computing the max
> observed LSN.  This is clearly not very attractive from a performance
> standpoint, but it would avoid the obvious failure mode where you lost
> some recent WAL segments along with pg_control.

If we follow this approach, what should be handling in case next-LSN is greater than
last checkpoint record location read from WAL files. Currently I can see StratUpXLOG throws
PANIC error in such situation.
I think this can happen in case of missing some recent WAL segments.

With Regards,
Amit Kapila.



pgsql-hackers by date:

Previous
From: Boszormenyi Zoltan
Date:
Subject: Re: [PATCH] lock_timeout and common SIGALRM framework
Next
From: "Etsuro Fujita"
Date:
Subject: Re: [PATCH] Lazy hashaggregate when no aggregation is needed