Re: [HACKERS] PinBuffer() no longer makes use of strategy - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: [HACKERS] PinBuffer() no longer makes use of strategy
Date
Msg-id CAPpHfdui_iHatMhfGApCTB2EWEkLSKRWZrb3EE7RtB2ZT5bv4g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] PinBuffer() no longer makes use of strategy  (Jim Nasby <jim.nasby@openscg.com>)
Responses Re: [HACKERS] PinBuffer() no longer makes use of strategy  (Teodor Sigaev <teodor@sigaev.ru>)
List pgsql-hackers
On Sun, Mar 19, 2017 at 3:51 AM, Jim Nasby <jim.nasby@openscg.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

pgsql-hackers by date:

Previous
From: Stas Kelvich
Date:
Subject: Re: [HACKERS] logical decoding of two-phase transactions
Next
From: Arthur Zakirov
Date:
Subject: Re: [HACKERS] Create replication slot in pg_basebackup if requestedand not yet present