BUG #18694: DISCARD ALL does not reset execution counters for plpgsql functions
От | PG Bug reporting form |
---|---|
Тема | BUG #18694: DISCARD ALL does not reset execution counters for plpgsql functions |
Дата | |
Msg-id | 18694-7b7b34afc52db448@postgresql.org обсуждение исходный текст |
Ответы |
Re: BUG #18694: DISCARD ALL does not reset execution counters for plpgsql functions
|
Список | pgsql-bugs |
The following bug has been logged on the website: Bug reference: 18694 Logged by: David Pavlíček Email address: pavlicek.david@gmail.com PostgreSQL version: 13.13 Operating system: Linux Description: Recently, I encountered a issue where execution plans for SQL queries within plpgsql functions differed significantly in a pooled database session, even though after each call the session state was cleared using the DISCARD ALL command. As per documentation, DISCARD ALL resets the session to its initial state, which is probably not true for plpgsql exec counters. When considering that execution plans for internal queries is generated based on number of execution within single session (custom vs generic), this can have huge impact on how the functions behaves in combination with connection pooler, whether central one like pgbouncer or those built into client libraries. In my opinion, the DISCARD ALL command should reset the internal execution counters of plpgsql functions.
В списке pgsql-bugs по дате отправления: