"Victor Y. Yegorov" <[EMAIL PROTECTED]> writes:
> * Alvaro Herrera <[EMAIL PROTECTED]> [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

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to