Re: PinBuffer() no longer makes use of strategy

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Jim Nasby <jim(dot)nasby(at)openscg(dot)com>
Cc: David Steele <david(at)pgmasters(dot)net>, Andres Freund <andres(at)anarazel(dot)de>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)2ndquadrant(dot)com>
Subject: Re: PinBuffer() no longer makes use of strategy
Date: 2017-03-20 11:24:45
Message-ID: CAPpHfdui_iHatMhfGApCTB2EWEkLSKRWZrb3EE7RtB2ZT5bv4g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Mar 19, 2017 at 3:51 AM, Jim Nasby <jim(dot)nasby(at)openscg(dot)com> wrote:

> On 3/16/17 12:48 PM, David Steele wrote:
>
>> This patch looks pretty straight forward and applies cleanly and
>> compiles at cccbdde.
>>
>> It's not a straight revert, though, so still seems to need review.
>>
>> Jim, do you know when you'll have a chance to look at that?
>>
>
> Yes. Compiles and passes for me as well.
>
> One minor point: previously the code did
>
> if (buf->usage_count < BM_MAX_USAGE_COUNT)
>
> but now it does
>
> if (BUF_STATE_GET_USAGECOUNT(buf_state) != BM_MAX_USAGE_COUNT)
>
> being prone to paranoia, I prefer the first, but I've seen both styles in
> the code so I don't know if it's worth futzing with.
>

Ok, let's be paranoic and do this same way as before. Revised patch is
attached.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment Content-Type Size
put-buffer-usagecount–logic–back-2.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Arthur Zakirov 2017-03-20 11:42:32 Re: Create replication slot in pg_basebackup if requested and not yet present
Previous Message Stas Kelvich 2017-03-20 11:10:09 Re: logical decoding of two-phase transactions