From: | "Jacky Leng" <lengjianquan(at)163(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Why need XLogReadBuffer have the paramter "init"? |
Date: | 2007-04-11 07:35:02 |
Message-ID: | evi3bs$vb9$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Cann't we remove this param?
We can rewrite like this:
1.XLogReadBuffer:
* remove init;
* everytime we cann't read a block, just "log_invalid_page" it, and return
InvalidBuffer;
2.Also rewrite all functions calling XLogReadBuffer with "init=true": skip
current block if XLogReadBuffer return InvalidBuffer. e.g. replace
Assert(BufferIsValid(buffer)) with:
* if (!BufferIsValid(buffer))
return;
Is there any harm?
Another question: if oid counter wraparound occured, and one relfilenode was
reused, e.g. see the following sequece:
1. Once there was a rel with oid XXXX;
2. Then it's dropped;
3. Then OIDs counter wraparound occured;
4. Another rel was created, and reused oid XXXX;
If there's no checkpoint since the first step, and system crashes after step
4, is it possible that the new rel's data be destroyed?
From | Date | Subject | |
---|---|---|---|
Next Message | Pavan Deolasee | 2007-04-11 08:13:43 | Re: [HACKERS] CIC and deadlocks |
Previous Message | Heikki Linnakangas | 2007-04-11 07:19:24 | Re: [HACKERS] Fix mdsync never-ending loop problem |