Re: Proposal: Progressive explain

Поиск
Список
Период
Сортировка
От Rafael Thofehrn Castro
Тема Re: Proposal: Progressive explain
Дата
Msg-id CAG0ozMq48+ODFoLW4HHexN8BKHfh_4c-n2b=yH9oaUnCZNZj6Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal: Progressive explain  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Proposal: Progressive explain
Re: Proposal: Progressive explain
Список pgsql-hackers
> Suppose:
> BEGIN;
> SELECT 1;
> SAVEPOINT bob;
> progressively explain something that aborts
> I think in this case we will call AbortSubTransaction(), not AbortTransaction().

Indeed. We need special treatment for subtransactions. There are 2 scenarios where
AbortSubTransaction() will be called alone and can affect progressive explains:
savepoints and PL/pgSQL exception blocks.

We don't want subxact aborts in PL/pgSQL exception blocks to perform cleanup
as the original query will continue to run and progressive explain tracking
is still applicable there.

So implementation was done based on transaction nested level. Cleanup is only
performed when AbortSubTransaction() is called in the same transaction nested
level as the one where the query is running. This covers both PL/pgSQL exception
blocks and savepoints.

Rafael.
Вложения

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