Re: Built-in connection pooler

Поиск
Список
Период
Сортировка
От Konstantin Knizhnik
Тема Re: Built-in connection pooler
Дата
Msg-id 74bb4ce5-45bc-fcd9-a1ef-0194a12df8bd@postgrespro.ru
обсуждение исходный текст
Ответ на Re: Built-in connection pooler  (Li Japin <japinli@hotmail.com>)
Ответы Re: Built-in connection pooler  (Jaime Casanova <jaime.casanova@2ndquadrant.com>)
Список pgsql-hackers
Hi, Li

Thank you very much for reporting the problem.

On 07.08.2019 7:21, Li Japin wrote:
> I inspect the code, and find the following code in DefineRelation function:
>
> if (stmt->relation->relpersistence != RELPERSISTENCE_TEMP
>           && stmt->oncommit != ONCOMMIT_DROP)
>           MyProc->is_tainted = true;
>
> For temporary table, MyProc->is_tainted might be true, I changed it as
> following:
>
> if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
>           || stmt->oncommit == ONCOMMIT_DROP)
>           MyProc->is_tainted = true;
>
> For temporary table, it works. I not sure the changes is right.
Sorry, it is really a bug.
My intention was to mark backend as tainted if it is creating temporary 
table without ON COMMIT DROP clause (in the last case temporary table 
will be local to transaction and so cause no problems with pooler).
Th right condition is:

     if (stmt->relation->relpersistence == RELPERSISTENCE_TEMP
         && stmt->oncommit != ONCOMMIT_DROP)
         MyProc->is_tainted = true;


-- 
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company




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

Предыдущее
От: Amit Langote
Дата:
Сообщение: Re: Handling RestrictInfo in expression_tree_walker
Следующее
От: Dilip Kumar
Дата:
Сообщение: Re: POC: Cleaning up orphaned files using undo logs