Re: How does backend server know which data file and pageto read?

Поиск
Список
Период
Сортировка
От Albe Laurenz
Тема Re: How does backend server know which data file and pageto read?
Дата
Msg-id A737B7A37273E048B164557ADEF4A58B53A1768D@ntex2010i.host.magwien.gv.at
обсуждение исходный текст
Ответ на How does backend server know which data file and page to read?  (anand086 <anand086@gmail.com>)
Список pgsql-novice
anand086 wrote:
> I would like to know, how does postgresql backend process know which data
> file and page number to read from when a sql is fired by client.

The PostgreSQL documentation on physical data layout will nicely
complement my explanations:
https://www.postgresql.org/docs/current/static/storage-file-layout.html

The file can be found using the "relfilenode" column in the
"pg_class" entry for the table.

To find the correct block, there are two ways:

- Read the whole table and search all blocks, filtering
  the data you need.  This is called "sequential scan".

- Use an index to search for keys.  The index entry points
  to the physical address of the data, which contains the
  block number.  This is an "index scan".

Yours,
Laurenz Albe

В списке pgsql-novice по дате отправления:

Предыдущее
От: anand086
Дата:
Сообщение: How does backend server know which data file and page to read?
Следующее
От: Dwaraka Srinivasan
Дата:
Сообщение: [NOVICE] select for share error when inserting data in RDS