Re: _mdfd_getseg can be expensive - Mailing list pgsql-hackers

From Peter Geoghegan
Subject Re: _mdfd_getseg can be expensive
Date
Msg-id CAM3SWZRfC3idro-ViKYZ23EEcVbpxh3Onhm+7C-b_pcqSdqa_Q@mail.gmail.com
Whole thread Raw
In response to Re: _mdfd_getseg can be expensive  (Andres Freund <andres@anarazel.de>)
Responses Re: _mdfd_getseg can be expensive  (Peter Geoghegan <pg@heroku.com>)
Re: _mdfd_getseg can be expensive  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Thu, Aug 18, 2016 at 5:26 PM, Andres Freund <andres@anarazel.de> wrote:
> Rebased version attached. A review would be welcome. Plan to push this
> forward otherwise in the not too far away future.

This looks good.

The only thing that stuck out to any degree is that we don't grow the
"reln->md_seg_fds[forknum]" array within the new _fdvec_resize()
function geometrically. In other words, we don't separately keep track
of the array size and allocated size, and grow the allocated size
using the doubling strategy that you see in many places.

Now, I freely admit that that probably doesn't matter, given what that
array tracks. I'm just pointing out that that aspect did give me
pause. The struct MdfdVec is small enough that that *might* be
worthwhile.

-- 
Peter Geoghegan



pgsql-hackers by date:

Previous
From: Petr Jelinek
Date:
Subject: Re: Logical Replication WIP
Next
From: Peter Geoghegan
Date:
Subject: Re: _mdfd_getseg can be expensive