Movatterモバイル変換


[0]ホーム

URL:



Facebook
Postgres Pro
Facebook
Downloads
Chapter 60. Index Access Method Interface Definition
Prev UpPart VII. InternalsHome Next

Chapter 60. Index Access Method Interface Definition

This chapter defines the interface between the corePostgres Pro system andindex access methods, which manage individual index types. The core system knows nothing about indexes beyond what is specified here, so it is possible to develop entirely new index types by writing add-on code.

All indexes inPostgres Pro are what are known technically assecondary indexes; that is, the index is physically separate from the table file that it describes. Each index is stored as its own physicalrelation and so is described by an entry in thepg_class catalog. The contents of an index are entirely under the control of its index access method. In practice, all index access methods divide indexes into standard-size pages so that they can use the regular storage manager and buffer manager to access the index contents. (All the existing index access methods furthermore use the standard page layout described inSection 63.6, and most use the same format for index tuple headers; but these decisions are not forced on an access method.)

An index is effectively a mapping from some data key values totuple identifiers, orTIDs, of row versions (tuples) in the index's parent table. A TID consists of a block number and an item number within that block (seeSection 63.6). This is sufficient information to fetch a particular row version from the table. Indexes are not directly aware that under MVCC, there might be multiple extant versions of the same logical row; to an index, each tuple is an independent object that needs its own index entry. Thus, an update of a row always creates all-new index entries for the row, even if the key values did not change. (HOT tuples are an exception to this statement; but indexes do not deal with those, either.) Index entries for dead tuples are reclaimed (by vacuuming) when the dead tuples themselves are reclaimed.


Prev Up Next
Chapter 59. Table Access Method Interface Definition Home 60.1. Basic API Structure for Indexes
pdfepub
Go to Postgres Pro Standard 17
By continuing to browse this website, you agree to the use of cookies. Go toPrivacy Policy.

[8]ページ先頭

©2009-2025 Movatter.jp