6

In the context of the CREATE ACCESS METHOD DDL in PostgreSQL,

CREATE ACCESS METHOD name
    TYPE access_method_type
    HANDLER handler_function

What is a a high level description of what an "access method" is and what they are used for?

1
2
+50

Using CREATE ACCESS METHOD in postgres allows you to define a function to handle (or 'access') a type of index.

It exists to allow you to define new ways for postgres to understand a mapping from the data key values to the actual TID that identifies the related value.

Without an understanding of how relational databases work, it's probably not something you'll ever directly deal with.

2
  • This has nothing to do with "relational databases" in general. This is extremely specific to Postgres an how indexes and their supporting infrastructure are implemented. – a_horse_with_no_name Jul 9 '18 at 19:26
  • 2
    @a_horse_with_no_name It's not something inherent to all relational databases, but since it deals with indexing of TIDs, you have to understand how a relational database works to properly implement an access method. – Jeff Alyanak Jul 9 '18 at 21:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.