From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | "Victor Y(dot) Yegorov" <viy(at)mits(dot)lv> |
Cc: | Alvaro Herrera <alvherre(at)surnet(dot)cl>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: adding new pages bulky way |
Date: | 2005-06-08 04:12:32 |
Message-ID: | 26969.1118203952@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
"Victor Y. Yegorov" <viy(at)mits(dot)lv> writes:
> * Alvaro Herrera <alvherre(at)surnet(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Abhijit Menon-Sen | 2005-06-08 04:36:18 | linuxtag 2005 |
Previous Message | Tom Lane | 2005-06-08 03:11:07 | Re: Visibility issue with pg_table_is_visible |