Re: plan cache overhead on plpgsql expression
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Date: 2020-03-19T09:47:17Z
Lists: pgsql-hackers
Hi Pavel, Sorry it took me a while to look at this. On Tue, Feb 25, 2020 at 4:28 AM Pavel Stehule <pavel.stehule@gmail.com> wrote: > po 24. 2. 2020 v 18:56 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal: >> But I found one issue - I don't know if this issue is related to your patch or plpgsql_check. >> >> plpgsql_check try to clean after it was executed - it cleans all plans. But some pointers on simple expressions are broken after catched exceptions. >> >> expr->plan = 0x80. Is interesting, so other fields of this expressions are correct. > > I am not sure, but after patching the SPI_prepare_params the current memory context is some short memory context. > > Can SPI_prepare_params change current memory context? It did before. But after patching different memory context is active. I haven't been able to see the behavior you reported. Could you let me know what unexpected memory context you see in the problematic case? -- Thank you, Amit
Commits
-
Rearrange validity checks for plpgsql "simple" expressions.
- fbc7a716084e 13.0 landed
-
Improve performance of "simple expressions" in PL/pgSQL.
- 8f59f6b9c037 13.0 landed
-
Ensure that plpgsql cleans up cleanly during parallel-worker exit.
- 4bfacc5a4411 9.5.22 landed
- deeda011b316 11.8 landed
- dd51b5696aa5 9.6.18 landed
- a54a87320782 12.3 landed
- 86e5badd22d9 13.0 landed
- 42d3649b58f4 10.13 landed