Re: adding new pages bulky way

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: adding new pages bulky way
Дата
Msg-id 26969.1118203952@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: adding new pages bulky way  ("Victor Y. Yegorov" <viy@mits.lv>)
Список pgsql-hackers
"Victor Y. Yegorov" <viy@mits.lv> writes:
> * Alvaro Herrera <alvherre@surnet.cl> [08.06.2005 00:39]:
>> Huh, why?  You need to grab the relation extension block
>> (LockRelationForExtension in CVS tip).

> Really? Didn't knew that. 

> Consider:
> 1) I add 2 pages to the newly-created relation
>    using P_NEW as BlockNumber;
> 2) then I do LockRelationForExtension; ReadBuffer(135) and
>    UnockRelationForExtension.

As things are set up at the moment, you really should not use
P_NEW at all unless you hold the relation extension lock.

(At least not for ordinary heap relations.  An index access
method could have its own rules about how to add blocks to
the relation --- hash does for instance.)

This is all pretty ugly in my view, and so I would not stand
opposed to ideas about a cleaner design ...
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Visibility issue with pg_table_is_visible
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: linuxtag 2005