Re: proposal: schema variables - Mailing list pgsql-hackers

From Laurenz Albe
Subject Re: proposal: schema variables
Date
Msg-id ecd67165d1e1645b21bda924c927590435584b27.camel@cybertec.at
Whole thread Raw
Responses Re: proposal: schema variables
List pgsql-hackers
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



pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Doc: typo in config.sgml
Next
From: Andrew Dunstan
Date:
Subject: Announcing Release 18 of the PostgreSQL Buildfarm client