Re: proposal: schema variables

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Erik Rijkers <er(at)xs4all(dot)nl>, Michael Paquier <michael(at)paquier(dot)xyz>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, DUVAL REMI <REMI(dot)DUVAL(at)cheops(dot)fr>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: proposal: schema variables
Date: 2024-11-02 05:46:12
Message-ID: ecd67165d1e1645b21bda924c927590435584b27.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2024-11-02 06:14:27 Announcing Release 18 of the PostgreSQL Buildfarm client
Previous Message Michael Paquier 2024-11-02 03:11:10 Re: Consider pipeline implicit transaction as a transaction block

Browse pgsql-performance by date

  From Date Subject
Next Message Pavel Stehule 2024-11-02 07:36:30 Re: proposal: schema variables
Previous Message Stepan Yankevych 2024-11-01 13:21:21 Postgresql 14/15/16/17 partition pruning on dependent table during join