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 003301cd5058$f44a5a30$dcdf0e90$@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
Based on the discussion and suggestions in this mail chain, following features can be implemented:

1. To compute the value of max LSN in data pages based on user input whether he wants it for an individual file,  a
particulardirectory or whole database. 

2a. To search the available WAL files for the latest checkpoint record and prints the value.
2b. To search the available WAL files for the latest checkpoint record and recreates a pg_control file pointing at that
checkpoint.

I have kept both options to address different kind of corruption scenarios.

1. WAL files are in separate partition which is not corrupt, only the partition where data files and pg_control is
corrupt.In this case users can use options 2a or 2b to proceed. 
2. All pg_control, data, WAL are on same disk partition which got corrupt.   In this case he can use options 1 and 2a
todecide the next-LSN for pg_control and proceed. 

Suggestions?

If there is an agreement to do this features, I can send the proposal which kind of options we can keep in existing or
newutility for the usage. 

With Regards,
Amit Kapila.




pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [PATCH 04/16] Add embedded list interface (header only)
Next
From: Andres Freund
Date:
Subject: Re: Catalog/Metadata consistency during changeset extraction from wal