Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

From: Maksim Milyutin <milyutinma(at)gmail(dot)com>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Maxim Orlov <orlovmg(at)gmail(dot)com>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, Palak Chaturvedi <chaturvedipalak1911(at)gmail(dot)com>, Jim Nasby <jim(dot)nasby(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Nitin Jadhav <nitinjadhavpostgres(at)gmail(dot)com>
Subject: Re: Extension Enhancement: Buffer Invalidation in pg_buffercache
Date: 2024-04-14 18:16:15
Message-ID: c4e75c92-b63f-4b45-bbcf-dddd601a9451@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 07.04.2024 02:07, Thomas Munro wrote:

> So this is the version I plan to commit.
>
> +bool
> +EvictUnpinnedBuffer(Buffer buf)
> +{
> ...
> + /* This will return false if it becomes dirty or someone else pins it. */
> + result = InvalidateVictimBuffer(desc);
> +
> + UnpinBuffer(desc);
> +
> + return result;
> +}

Hi, Thomas!

Should not we call at the end the StrategyFreeBuffer() function to add
target buffer to freelist and not miss it after invalidation?

--
Best regards,
Maksim Milyutin

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2024-04-14 20:34:55 White-box testing heap pruning
Previous Message Tomas Vondra 2024-04-14 17:09:26 Re: Parallel CREATE INDEX for BRIN indexes