From: | Jim Nasby <jim(dot)nasby(at)gmail(dot)com> |
---|---|
To: | Cédric Villemain <cedric(dot)villemain+pgsql(at)abcsql(dot)com>, Palak Chaturvedi <chaturvedipalak1911(at)gmail(dot)com>, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Subject: | Re: Extension Enhancement: Buffer Invalidation in pg_buffercache |
Date: | 2024-01-03 23:15:11 |
Message-ID: | 3510716d-d3f3-40c8-9f7f-d644171acfb6@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 1/3/24 10:25 AM, Cédric Villemain
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:8b8c709a-c7cc-4965-8296-64f549c27501(at)abcsql(dot)com">Hi
Palak,
<br>
<br>
I did a quick review of the patch:
<br>
<br>
+CREATE FUNCTION pg_buffercache_invalidate(IN int, IN bool default
true)
<br>
+RETURNS bool
<br>
+AS 'MODULE_PATHNAME', 'pg_buffercache_invalidate'
<br>
+LANGUAGE C PARALLEL SAFE;
<br>
<br>
--> Not enforced anywhere, but you can also add a comment to
the function, for end users...
<br>
</blockquote>
<p>The arguments should also have names...</p>
<blockquote type="cite"
cite="mid:8b8c709a-c7cc-4965-8296-64f549c27501(at)abcsql(dot)com"><br>
+ force = PG_GETARG_BOOL(1);
<br>
<br>
I think you also need to test PG_ARGISNULL with force parameter.
<br>
</blockquote>
Actually, that's true for the first argument as well. Or, just mark
the function as STRICT.<br>
<pre class="moz-signature" cols="72">--
Jim Nasby, Data Architect, Austin TX</pre>
</body>
</html>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 1.3 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Cedric Villemain | 2024-01-03 23:23:43 | Change prefetch and read strategies to use range in pg_prewarm ... and raise a question about posix_fadvise WILLNEED |
Previous Message | Dian Fay | 2024-01-03 23:05:47 | Re: add function argument names to regex* functions. |