On Tue, 2024-10-29 at 08:16 +0100, Pavel Stehule wrote:
> again, necessary rebase
I have started looking at patch 5, and I have some questions and comments.
- The commit message is headed "memory cleaning after DROP VARIABLE", but
the rest of the commit message speaks of sinval messages. These two
things are independent, aren't they? And both lead to the need to validate
the variables, right?
Then this code comment would for example be wrong:
/* true after accepted sinval message */
static bool needs_validation = false;
It also becomes "true" after DROP VARIABLE, right?
I am happy to fix the comment, but I want to understand the patch first.
- I see that the patch adds cleanup of invalid session variable to each
COMMIT. Is that a good idea? I'd expect that it is good enough to clean
up whenever session variables are accessed.
Calling remove_invalid_session_variables() during each COMMIT will affect
all transactions, and I don't see the benefit.
Also, do we need to call it during pg_session_variables()?
Yours,
Laurenz Albe