Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

Cedric Villemain <cedric.villemain+pgsql@abcsql.com>

From: Cédric Villemain <cedric.villemain+pgsql@abcsql.com>
To: Palak Chaturvedi <chaturvedipalak1911@gmail.com>
Cc: Jim Nasby <jim.nasby@gmail.com>, pgsql-hackers@postgresql.org, Thomas Munro <thomas.munro@gmail.com>, Nitin Jadhav <nitinjadhavpostgres@gmail.com>
Date: 2024-01-14T13:36:26Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Add pg_buffercache_evict() function for testing.

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