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 1rP0fH-008gau-LO for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Jan 2024 13:36:40 +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 1rP0fD-00BdkZ-Tx for pgsql-hackers@arkaria.postgresql.org; Sun, 14 Jan 2024 13:36:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rP0fD-00BdkR-Hf for pgsql-hackers@lists.postgresql.org; Sun, 14 Jan 2024 13:36:35 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by magus.postgresql.org with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rP0f9-001j8d-UL for pgsql-hackers@postgresql.org; Sun, 14 Jan 2024 13:36:34 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 597381BF203; Sun, 14 Jan 2024 13:36:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=abcsql.com; s=gm1; t=1705239389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MBHnhBdJx84vum2i3zQdspDvH+g27NaukHIPD/yjyh4=; b=o+PkmhbukPaSf2khM4pA8047YYrNSomI9sM1NDo1Qe/hD27iIz6QvkpCfuYDmEutHdOe4n aiKL9/HPF2ejqPpUASwVtkVDYaA7ia0Lr8Rqvp1KxM+Qrh69AdjpKpMacFy807GvNPAIj+ mKoTxFRFqmTgKYj54Rq3P6/XqLuXkQmES8K4xeE6y06v0S4h75lQyBiOAWFLadq0/rsgrp Y4hcAapplBKSuuoE91GJqgAAv+YjeM6VZxfvRXqq2cPVm9I/Vlk0cuTM5e59LBZoG5EtaR oSou8ZuNEB1+CIP7RHHbVQvMu3iA14H1NXjpjTBgAwDQpZnbQthPBuVJrYU29w== Message-ID: Date: Sun, 14 Jan 2024 14:36:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: =?UTF-8?Q?C=C3=A9dric_Villemain?= Subject: Re: Extension Enhancement: Buffer Invalidation in pg_buffercache Content-Language: en-US To: Palak Chaturvedi References: <8b8c709a-c7cc-4965-8296-64f549c27501@abcsql.com> <3510716d-d3f3-40c8-9f7f-d644171acfb6@gmail.com> Cc: Jim Nasby , pgsql-hackers@postgresql.org, Thomas Munro , Nitin Jadhav Organization: Data Bene In-Reply-To: <3510716d-d3f3-40c8-9f7f-d644171acfb6@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-GND-Sasl: cedric.villemain@abcsql.com List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi Palak, there is currently even more interest in your patch as it should help building tests for on-going development around cache/read management/effects. Do you expect to be able to follow-up in the coming future ? Thank you, Cédric On 04/01/2024 00:15, Jim Nasby wrote: > On 1/3/24 10:25 AM, Cédric Villemain wrote: >> Hi Palak, >> >> I did a quick review of the patch: >> >> +CREATE FUNCTION pg_buffercache_invalidate(IN int, IN bool default true) >> +RETURNS bool >> +AS 'MODULE_PATHNAME', 'pg_buffercache_invalidate' >> +LANGUAGE C PARALLEL SAFE; >> >> --> Not enforced anywhere, but you can also add a comment to the >> function, for end users... > > The arguments should also have names... > >> >> +    force = PG_GETARG_BOOL(1); >> >> I think you also need to test PG_ARGISNULL with force parameter. > Actually, that's true for the first argument as well. Or, just mark the > function as STRICT. > > -- > Jim Nasby, Data Architect, Austin TX > -- --- Cédric Villemain +33 (0)6 20 30 22 52 https://Data-Bene.io PostgreSQL Expertise, Support, Training, R&D