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"?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Question about SHM_QUEUE
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: conflicting gettimeofday with MinGW