Re: cache lookup failed for index

Поиск
Список
Период
Сортировка
От Willy-Bas Loos
Тема Re: cache lookup failed for index
Дата
Msg-id CAHnozTiLwZD=KHovfMO=AE7winK9rV8FqUfJmVxvmGLbEoSxgw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: cache lookup failed for index  (Willy-Bas Loos <willybas@gmail.com>)
Ответы Re: cache lookup failed for index
Список pgsql-general
On Wed, Jun 29, 2016 at 11:16 AM, Willy-Bas Loos <willybas@gmail.com> wrote:

Ah OK. So it needs a lock for the visibility to be registered to the transaction, is that it?


Wait that doesn't make sense. pg_dump merely describes the table in DDL, so it doesn't even need access to the index pages. It only needs to read the pg_catalog afaik.
However, the indexes are created as a last step in the pg_dump process (at least in the resulting dump file). So it first makes the DDL to create the table, then dumps the data, and in the end it describes the constraints, indexes and privileges.
So maybe pg_dump first creates the DDL, then acquires a access share lock on the table for dumping the data, and then when it's time to create DDL for the index, it is gone from the pg_catalog.
So what i don't get is, -if the above is the case- If  pg_dump expects to find an index, it already knows about its existence. Then why does it need to look for it again?

--
Willy-Bas Loos

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

Предыдущее
От: Willy-Bas Loos
Дата:
Сообщение: Re: cache lookup failed for index
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Sub-query having NULL row returning FALSE result