亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? readme

?? postgresql8.3.4源碼,開源數據庫
??
?? 第 1 頁 / 共 3 頁
字號:
$PostgreSQL: pgsql/src/backend/access/nbtree/README,v 1.18 2007/09/12 22:10:26 tgl Exp $This directory contains a correct implementation of Lehman and Yao'shigh-concurrency B-tree management algorithm (P. Lehman and S. Yao,Efficient Locking for Concurrent Operations on B-Trees, ACM Transactionson Database Systems, Vol 6, No. 4, December 1981, pp 650-670).  We alsouse a simplified version of the deletion logic described in Lanin andShasha (V. Lanin and D. Shasha, A Symmetric Concurrent B-Tree Algorithm,Proceedings of 1986 Fall Joint Computer Conference, pp 380-389).The Lehman and Yao algorithm and insertions-------------------------------------------We have made the following changes in order to incorporate the L&Y algorithminto Postgres:The requirement that all btree keys be unique is too onerous,but the algorithm won't work correctly without it.  Fortunately, it isonly necessary that keys be unique on a single tree level, because L&Yonly use the assumption of key uniqueness when re-finding a key in aparent page (to determine where to insert the key for a split page).Therefore, we can use the link field to disambiguate multipleoccurrences of the same user key: only one entry in the parent levelwill be pointing at the page we had split.  (Indeed we need not look atthe real "key" at all, just at the link field.)  We can distinguishitems at the leaf level in the same way, by examining their links toheap tuples; we'd never have two items for the same heap tuple.Lehman and Yao assume that the key range for a subtree S is describedby Ki < v <= Ki+1 where Ki and Ki+1 are the adjacent keys in the parentpage.  This does not work for nonunique keys (for example, if we haveenough equal keys to spread across several leaf pages, there *must* besome equal bounding keys in the first level up).  Therefore we assumeKi <= v <= Ki+1 instead.  A search that finds exact equality to abounding key in an upper tree level must descend to the left of thatkey to ensure it finds any equal keys in the preceding page.  Aninsertion that sees the high key of its target page is equal to the keyto be inserted has a choice whether or not to move right, since the newkey could go on either page.  (Currently, we try to find a page wherethere is room for the new key without a split.)Lehman and Yao don't require read locks, but assume that in-memorycopies of tree pages are unshared.  Postgres shares in-memory buffersamong backends.  As a result, we do page-level read locking on btreepages in order to guarantee that no record is modified while we areexamining it.  This reduces concurrency but guaranteees correctbehavior.  An advantage is that when trading in a read lock for awrite lock, we need not re-read the page after getting the write lock.Since we're also holding a pin on the shared buffer containing thepage, we know that buffer still contains the page and is up-to-date.We support the notion of an ordered "scan" of an index as well asinsertions, deletions, and simple lookups.  A scan in the forwarddirection is no problem, we just use the right-sibling pointers thatL&Y require anyway.  (Thus, once we have descended the tree to thecorrect start point for the scan, the scan looks only at leaf pagesand never at higher tree levels.)  To support scans in the backwarddirection, we also store a "left sibling" link much like the "rightsibling".  (This adds an extra step to the L&Y split algorithm: whileholding the write lock on the page being split, we also lock its formerright sibling to update that page's left-link.  This is safe since nowriter of that page can be interested in acquiring a write lock on ourpage.)  A backwards scan has one additional bit of complexity: afterfollowing the left-link we must account for the possibility that theleft sibling page got split before we could read it.  So, we have tomove right until we find a page whose right-link matches the page wecame from.  (Actually, it's even harder than that; see deletion discussionbelow.)Page read locks are held only for as long as a scan is examining a page.To minimize lock/unlock traffic, an index scan always searches a leaf pageto identify all the matching items at once, copying their heap tuple IDsinto backend-local storage.  The heap tuple IDs are then processed whilenot holding any page lock within the index.  We do continue to hold a pinon the leaf page, to protect against concurrent deletions (see below).In this state the scan is effectively stopped "between" pages, eitherbefore or after the page it has pinned.  This is safe in the presence ofconcurrent insertions and even page splits, because items are never movedacross pre-existing page boundaries --- so the scan cannot miss any itemsit should have seen, nor accidentally return the same item twice.  The scanmust remember the page's right-link at the time it was scanned, since thatis the page to move right to; if we move right to the current right-linkthen we'd re-scan any items moved by a page split.  We don't similarlyremember the left-link, since it's best to use the most up-to-dateleft-link when trying to move left (see detailed move-left algorithm below).In most cases we release our lock and pin on a page before attemptingto acquire pin and lock on the page we are moving to.  In a few placesit is necessary to lock the next page before releasing the current one.This is safe when moving right or up, but not when moving left or down(else we'd create the possibility of deadlocks).Lehman and Yao fail to discuss what must happen when the root pagebecomes full and must be split.  Our implementation is to split theroot in the same way that any other page would be split, then constructa new root page holding pointers to both of the resulting pages (whichnow become siblings on the next level of the tree).  The new root pageis then installed by altering the root pointer in the meta-data page (seebelow).  This works because the root is not treated specially in anyother way --- in particular, searches will move right using its linkpointer if the link is set.  Therefore, searches will find the datathat's been moved into the right sibling even if they read the meta-datapage before it got updated.  This is the same reasoning that makes asplit of a non-root page safe.  The locking considerations are similar too.When an inserter recurses up the tree, splitting internal pages to insertlinks to pages inserted on the level below, it is possible that it willneed to access a page above the level that was the root when it began itsdescent (or more accurately, the level that was the root when it read themeta-data page).  In this case the stack it made while descending does nothelp for finding the correct page.  When this happens, we find the correctplace by re-descending the tree until we reach the level one above thelevel we need to insert a link to, and then moving right as necessary.(Typically this will take only two fetches, the meta-data page and the newroot, but in principle there could have been more than one root splitsince we saw the root.  We can identify the correct tree level by means ofthe level numbers stored in each page.  The situation is rare enough thatwe do not need a more efficient solution.)Lehman and Yao assume fixed-size keys, but we must deal withvariable-size keys.  Therefore there is not a fixed maximum number ofkeys per page; we just stuff in as many as will fit.  When we split apage, we try to equalize the number of bytes, not items, assigned toeach of the resulting pages.  Note we must include the incoming item inthis calculation, otherwise it is possible to find that the incomingitem doesn't fit on the split page where it needs to go!The deletion algorithm----------------------Before deleting a leaf item, we get a super-exclusive lock on the targetpage, so that no other backend has a pin on the page when the deletionstarts.  This is not necessary for correctness in terms of the btree indexoperations themselves; as explained above, index scans logically stop"between" pages and so can't lose their place.  The reason we do it is toprovide an interlock between non-full VACUUM and indexscans.  Since VACUUMdeletes index entries before deleting tuples, the super-exclusive lockguarantees that VACUUM can't delete any heap tuple that an indexscanningprocess might be about to visit.  (This guarantee works only for simpleindexscans that visit the heap in sync with the index scan, not for bitmapscans.  We only need the guarantee when using non-MVCC snapshot rules suchas SnapshotNow, so in practice this is only important for system catalogaccesses.)Because a page can be split even while someone holds a pin on it, it ispossible that an indexscan will return items that are no longer stored onthe page it has a pin on, but rather somewhere to the right of that page.To ensure that VACUUM can't prematurely remove such heap tuples, we requirebtbulkdelete to obtain super-exclusive lock on every leaf page in the index,even pages that don't contain any deletable tuples.  This guarantees thatthe btbulkdelete call cannot return while any indexscan is still holdinga copy of a deleted index tuple.  Note that this requirement does not saythat btbulkdelete must visit the pages in any particular order.  (See alsoon-the-fly deletion, below.) There is no such interlocking for deletion of items in internal pages,since backends keep no lock nor pin on a page they have descended past.Hence, when a backend is ascending the tree using its stack, it mustbe prepared for the possibility that the item it wants is to the left ofthe recorded position (but it can't have moved left out of the recordedpage).  Since we hold a lock on the lower page (per L&Y) until we havere-found the parent item that links to it, we can be assured that theparent item does still exist and can't have been deleted.  Also, becausewe are matching downlink page numbers and not data keys, we don't have anyproblem with possibly misidentifying the parent item.We consider deleting an entire page from the btree only when it's becomecompletely empty of items.  (Merging partly-full pages would allow betterspace reuse, but it seems impractical to move existing data items left orright to make this happen --- a scan moving in the opposite directionmight miss the items if so.  We could do it during VACUUM FULL, though.)Also, we *never* delete the rightmost page on a tree level (thisrestriction simplifies the traversal algorithms, as explained below).To delete an empty page, we acquire write lock on its left sibling (ifany), the target page itself, the right sibling (there must be one), andthe parent page, in that order.  The parent page must be found using thesame type of search as used to find the parent during an insertion split.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2024国产精品| 99视频超级精品| 91麻豆免费看| 青青草国产精品97视觉盛宴| 在线观看欧美日本| 午夜国产精品一区| 精品久久人人做人人爽| 国产剧情av麻豆香蕉精品| 国产精品免费免费| 91福利在线看| 久久成人综合网| 中文久久乱码一区二区| 国产精品三级久久久久三级| 国产精品亲子伦对白| 最好看的中文字幕久久| 欧美tickling网站挠脚心| 精品国产一区二区精华| 欧美亚洲国产一区二区三区| 国产剧情一区二区三区| 成人精品视频网站| 天天爽夜夜爽夜夜爽精品视频| 午夜精品福利一区二区蜜股av| 婷婷成人综合网| 国产乱码精品一区二区三区av| 波多野结衣亚洲| 色拍拍在线精品视频8848| 国产剧情一区二区三区| 99精品视频在线免费观看| 国产一区二区精品久久| 视频一区欧美日韩| 亚洲国产wwwccc36天堂| 亚洲国产精品v| 欧美一区二区黄| 日本道在线观看一区二区| 欧美福利电影网| 精品视频123区在线观看| 播五月开心婷婷综合| 国产一区 二区| 一本到不卡精品视频在线观看| 欧美日本一道本在线视频| 欧美图区在线视频| 久久亚洲二区三区| 亚洲一区在线观看免费| 亚洲美女淫视频| 一区二区三区欧美激情| 亚洲bt欧美bt精品777| 亚洲精品福利视频网站| 亚洲一区日韩精品中文字幕| 国产在线精品一区二区三区不卡| 蜜臀av一区二区| 精品亚洲国内自在自线福利| 久久精品国产秦先生| 欧美色网站导航| 成人免费视频在线观看| 亚洲男同性视频| 国产成人午夜视频| 岛国精品在线观看| 欧美大黄免费观看| 亚洲国产岛国毛片在线| 奇米精品一区二区三区在线观看 | 国产成人自拍网| 在线不卡中文字幕| 亚洲国产精品精华液网站| 99久久精品国产导航| 国产午夜久久久久| 亚洲欧美国产三级| 北条麻妃一区二区三区| 国产欧美日韩精品在线| 亚洲无线码一区二区三区| 91香蕉视频污在线| 亚洲欧美在线另类| 成人毛片视频在线观看| 国产色产综合产在线视频| 国产一区二区三区免费在线观看| 欧美一二三区在线观看| 国产欧美日韩三区| 国产福利不卡视频| 国产丝袜欧美中文另类| 国产99久久久国产精品潘金网站| 欧美色图12p| 亚洲国产日韩精品| 7777女厕盗摄久久久| 国产精品久久久久9999吃药| 亚洲高清免费视频| 51久久夜色精品国产麻豆| 午夜精品一区在线观看| 欧美一区二区三区免费在线看 | 亚洲精品免费播放| 在线观看欧美黄色| 日韩国产成人精品| 97aⅴ精品视频一二三区| 亚洲精品欧美在线| 日韩一区二区三区视频| 国产91清纯白嫩初高中在线观看 | 在线视频你懂得一区二区三区| 亚洲精品成人a在线观看| 欧美精品少妇一区二区三区| 全国精品久久少妇| 国产色一区二区| 在线一区二区观看| 奇米精品一区二区三区在线观看| 久久久精品国产免大香伊 | 久久久久久久网| 成人av电影免费在线播放| 一区二区三区四区精品在线视频| 91精品国产综合久久久久| 国产成人免费视频精品含羞草妖精| 日本一区二区三区免费乱视频| 欧洲精品在线观看| 国产精品一区二区在线观看不卡| 国产精品国产三级国产aⅴ入口 | 亚洲最新在线观看| 精品少妇一区二区三区| 99久久国产免费看| 久久99九九99精品| 曰韩精品一区二区| 久久久久国产精品人| 欧美在线观看一区二区| 国产精品一区二区免费不卡| 亚洲一二三区不卡| 国产精品美女一区二区| 欧美久久高跟鞋激| 99re这里只有精品首页| 免费av网站大全久久| 亚洲国产精品一区二区www| 国产欧美精品一区二区三区四区| 欧美日韩黄视频| 成人av电影观看| 国产酒店精品激情| 久久国产麻豆精品| 偷拍自拍另类欧美| 亚洲一区二区欧美| 亚洲男人的天堂av| 国产精品色呦呦| 久久蜜桃av一区精品变态类天堂 | 国产精品成人在线观看| 精品少妇一区二区三区在线播放| 欧美日韩在线一区二区| 北条麻妃一区二区三区| 成人综合婷婷国产精品久久蜜臀| 经典一区二区三区| 美女脱光内衣内裤视频久久网站 | 在线观看日韩毛片| 91免费看视频| 色噜噜狠狠一区二区三区果冻| 处破女av一区二区| 成人av资源站| 91免费小视频| 91久久精品一区二区| 欧洲在线/亚洲| 欧美精品久久久久久久久老牛影院| 欧洲精品在线观看| 欧美日韩一区久久| 7777精品伊人久久久大香线蕉最新版| 欧美日韩午夜精品| 制服丝袜在线91| 日韩精品一区二区三区蜜臀 | 欧美一区二区三区在线| 日韩一级免费一区| 精品国产乱子伦一区| 国产天堂亚洲国产碰碰| 国产精品视频你懂的| 亚洲欧洲日韩av| 亚洲成人av在线电影| 蜜臀av性久久久久av蜜臀妖精 | 国产精品女上位| 综合激情网...| 午夜久久福利影院| 国产一二三精品| 91在线无精精品入口| 欧美日韩精品一区二区| 久久只精品国产| 国产精品久久久久影院色老大| 亚洲精品写真福利| 日本不卡高清视频| 国产成人a级片| 欧美丝袜第三区| 欧美精品一区二区三| 亚洲免费三区一区二区| 青青青伊人色综合久久| 国产不卡视频一区二区三区| 91在线观看美女| 欧美一级高清大全免费观看| 久久久国际精品| 亚洲一区二区偷拍精品| 国产伦精一区二区三区| 色一区在线观看| 久久久久久一二三区| 亚洲一级电影视频| 国产精品99久久不卡二区| 在线看一区二区| 国产午夜亚洲精品不卡| 亚洲成人免费看| 成人国产精品视频| 日韩欧美一卡二卡| 亚洲综合自拍偷拍| av亚洲精华国产精华精| 日韩欧美激情一区| 亚洲第一综合色| 一本大道av伊人久久综合|