Why need XLogReadBuffer have the paramter "init"?
| От | Jacky Leng |
|---|---|
| Тема | Why need XLogReadBuffer have the paramter "init"? |
| Дата | |
| Msg-id | evi3bs$vb9$1@news.hub.org обсуждение исходный текст |
| Ответы |
Re: Why need XLogReadBuffer have the paramter "init"?
|
| Список | 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?
В списке pgsql-hackers по дате отправления: