Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t76xq-00030Y-JW for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Nov 2024 05:46:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t76xo-003X4d-4N for pgsql-hackers@arkaria.postgresql.org; Sat, 02 Nov 2024 05:46:20 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t76xn-003X3M-LB for pgsql-hackers@lists.postgresql.org; Sat, 02 Nov 2024 05:46:20 +0000 Received: from mail-ed1-x535.google.com ([2a00:1450:4864:20::535]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1t76xk-0044jx-Px for pgsql-hackers@lists.postgresql.org; Sat, 02 Nov 2024 05:46:18 +0000 Received: by mail-ed1-x535.google.com with SMTP id 4fb4d7f45d1cf-5ceca7df7f0so293080a12.1 for ; Fri, 01 Nov 2024 22:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=cybertec.at; t=1730526375; x=1731131175; darn=lists.postgresql.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=peFBUIZ+jDf6ttKjSCFXiRqinDOmrwA+Tu8yyTYCDBw=; b=k/gh6cQ+SrXqxay58aGeFQ4+rDjr7rmsUYus7j6nnsR0uizec1rFTtvhOwVPcyGE/B Xb9z82vP6a16D/k0wRpdGnYgMRy8B3+HxO1zPAG9xf24wy0b4Txw35MUQpa2Nf5gYIHl b0octP55Vteeg43nE6yhjo3cmkUP8GL/tNVm4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730526375; x=1731131175; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=peFBUIZ+jDf6ttKjSCFXiRqinDOmrwA+Tu8yyTYCDBw=; b=bSBdlSf6r8WmgqzaFKTxpyTmy9Pv5ScOT9em4Oe1T4mqwGJf9fU9/vF4z0VziCT+wp MV6In36qaodpHWIcJVRCd3PQ+0SdzAmyl87FbDTnlmsCk6cFCwszI0X+1ubkPXO+sx3Q ZSG8a5YY4msDkLkMlI2vLh+Sqorm12EKd8hFlBAiCWwdoAu51nBhzavadnGTod684Yko izr6DAqGtyykUxsd/OMjOiRj6QW74e4qqjOcLmwxP6NragWjzwAmxbjbRhfhPPypya4T YXWTJ728ab3QsM23uDDoVmPXWBrvZXp+c9wuq8Ch57ml03AO0FJdAdzrAopXfZYwThEM lXdg== X-Forwarded-Encrypted: i=1; AJvYcCVy9yH9FOINS37+g9MrbeoF24u9pWhIMLp2Q9ahUZDfxsC8eLwAox47dVMclK22gpbQgg8/BJUNL7yK+hRy@lists.postgresql.org X-Gm-Message-State: AOJu0YxgOEjNGG4aV1zmRp/Ksvj8F38RGszCkgfC4q7BQAKHxl5RwnMu DDRzYSQIuwN9kY5v7UjdUdQ5V6rUpZ6Pw3rf5cMayVxSFMRjTPLH+FkAd5WlbcE= X-Google-Smtp-Source: AGHT+IGLN84JoQ1MpZ0P0AKO0fVy/97BNqtAc+5dexk+0F+NwhwNR0NjSyvI0/C2W0rA6OyFqUyGLw== X-Received: by 2002:a05:6402:27d0:b0:5c9:8293:6cc2 with SMTP id 4fb4d7f45d1cf-5ceb9343309mr4619089a12.27.1730526374609; Fri, 01 Nov 2024 22:46:14 -0700 (PDT) Received: from localhost.localdomain ([2001:871:260:172:c359:a99c:152:c181]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5ceac78cd44sm2205250a12.55.2024.11.01.22.46.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Nov 2024 22:46:14 -0700 (PDT) Message-ID: Subject: Re: proposal: schema variables From: Laurenz Albe To: Pavel Stehule Cc: Erik Rijkers , Michael Paquier , Amit Kapila , DUVAL REMI , PostgreSQL Hackers Date: Sat, 02 Nov 2024 06:46:12 +0100 In-Reply-To: References: <20200924035637.GF28585@paquier.xyz> <20201001033824.GC8130@paquier.xyz> <51a9a68e8a998d04df17417d45c1dbd4@xs4all.nl> <89817942c99da01cd5e7850fe418436b@xs4all.nl> <56ca532c37eb0b540961f74a7bd5db39@xs4all.nl> <8181bd3abc647bdae5a4f78e71e62478a98c75f4.camel@cybertec.at> <9e67d49deb18270eddb95e602c83f02b98459843.camel@cybertec.at> <3b662dc5b615d4c20a55e8e2fbe6fc00fe00609d.camel@cybertec.at> <6996931e8c9edf3b82223e74e92326a7ed06c1d6.camel@cybertec.at> <67aa68a7e6dfb44c0cbbdf7f97cadfede4269ce5.camel@cybertec.at> <04ec666686e9e21cb515617df06885c66f3d34ce.camel@cybertec.at> <3850a85012d040827b10193189edbe2c23a64f8f.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-2.fc40) MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 valida= te the variables, right? Then this code comment would for example be wrong: /* true after accepted sinval message */ static bool needs_validation =3D 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