Re: proposal: schema variables

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Dmitry Dolgov <9erthalion6(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, 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>, jian he <jian(dot)universality(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PegoraroF10 <marcos(at)f10(dot)com(dot)br>
Subject: Re: proposal: schema variables
Date: 2025-06-04 20:22:06
Message-ID: CAFj8pRAMaiRSRyye9LdOTh_TgbwmohuXh7cCS9eSLtOUzCJU5Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-performance

Hi

I found a small problem in the pg_session_variables function. I expected
syscache to be flushed for recent catalog changes
before any usage of this function. But it is not always true. When I used
the DCATCACHE_FORCE_RELEASE build option, I got
different results from isolation tests. Fix is simple - just
call AcceptInvalidationMessages(); before touching syscache in this
function.

Note: pg_session_variables is a debug function - it shows entries of a hash
table with session variables used in the current session.
The result's attribute with information if the entry is related to a valid
or to invalid value (related tuple in pg_variable exists or not) was not
correct.

Regards

Pavel

Attachment Content-Type Size
v20250604-0014-memory-cleaning-after-DROP-VARIABLE.patch text/x-patch 23.3 KB
v20250604-0015-plpgsql-tests.patch text/x-patch 11.3 KB
v20250604-0013-DISCARD-VARIABLES.patch text/x-patch 9.6 KB
v20250604-0011-LET-command-assign-a-result-of-expression-to-the-ses.patch text/x-patch 50.6 KB
v20250604-0012-function-pg_session_variables-for-cleaning-tests.patch text/x-patch 4.8 KB
v20250604-0010-svariableReceiver.patch text/x-patch 8.6 KB
v20250604-0009-fill-an-auxiliary-buffer-with-values-of-session-vari.patch text/x-patch 19.5 KB
v20250604-0008-collect-session-variables-used-in-plan-and-assign-pa.patch text/x-patch 16.5 KB
v20250604-0007-local-HASHTAB-for-currently-used-session-variables-a.patch text/x-patch 14.1 KB
v20250604-0006-session-variable-fences-parsing.patch text/x-patch 32.2 KB
v20250604-0005-support-of-session-variables-for-pg_dump.patch text/x-patch 15.3 KB
v20250604-0004-support-of-session-variables-for-psql.patch text/x-patch 22.7 KB
v20250604-0003-GRANT-REVOKE-variable.patch text/x-patch 52.7 KB
v20250604-0001-introduce-new-class-catalog-pg_variable.patch text/x-patch 16.3 KB
v20250604-0002-CREATE-DROP-ALTER-VARIABLE.patch text/x-patch 80.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-06-04 20:23:23 Re: Add --system-identifier / -s option to pg_resetwal
Previous Message Peter Eisentraut 2025-06-04 20:20:17 Re: Enhance pg_createsubscriber to create required standby.

Browse pgsql-performance by date

  From Date Subject
Next Message Frédéric Yhuel 2025-06-05 14:13:54 Re: ALTER TABLE ADD FOREIGN KEY to partitioned table, is not parallelized
Previous Message Dimitrios Apostolou 2025-06-04 14:12:54 Re: ALTER TABLE ADD FOREIGN KEY to partitioned table, is not parallelized