Re: recover corrupted pg_controldata from WAL

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: yuanjia lee <yuanjia_pg(at)yahoo(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: recover corrupted pg_controldata from WAL
Date: 2005-07-21 14:03:53
Message-ID: 18910.1121954633@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

yuanjia lee <yuanjia_pg(at)yahoo(dot)com> writes:
> The algorithm of searching the WAL is like this:

> 1. Read name of the segment files from xlog directory, and put all of their name into an one way list, the list is descending according to the time line, xlog id, segement id. (Athough I use only the lastest file in the implementation, but the list can be used for the feature like dump log in future.)

You do realize that in most situations, the segment files with the
newest-looking names have not been used yet, and contain older rather
than newer data?

When multiple timelines are present, I'm not sure I care for the
heuristic "use the highest timeline number", either.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruno Wolff III 2005-07-21 14:09:34 Re: Imprecision of DAYS_PER_MONTH
Previous Message Dave Page 2005-07-21 13:59:56 --enable-thread-safety on Win32