Re: [PATCH] Remove twice assignment with var pageop (nbtree.c). - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).
Date
Msg-id CAH2-Wzn=TaNfJahPEjNrqrVax6raq8s6Od53SHh9LhSRWaP9Fw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Remove twice assignment with var pageop (nbtree.c).  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Dec 19, 2019 at 7:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> I don't think this is actually a good idea.  What it is is a foot-gun,
> because if anyone adds code there that wants to access the special area
> of that particular page, it'll do the wrong thing, unless they remember
> to put back the assignment of "opaque".  The sequence of BufferGetPage()
> and PageGetSpecialPointer() is a very standard switch-our-attention-
> to-another-page locution in nbtree and other index AMs.

+1

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [PATCH] Increase the maximum value track_activity_query_size
Next
From: Dave Cramer
Date:
Subject: Re: How is this possible "publication does not exist"