From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: _mdfd_getseg can be expensive |
Date: | 2014-11-01 17:23:47 |
Message-ID: | 20141101172347.GP13584@awork2.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-11-01 12:57:40 -0400, Tom Lane wrote:
> Andres Freund <andres(at)2ndquadrant(dot)com> writes:
> > On 2014-10-31 18:48:45 -0400, Tom Lane wrote:
> >> While the basic idea is sound, this particular implementation seems
> >> pretty bizarre. What's with the "md_seg_no" stuff, and why is that
> >> array typed size_t?
>
> > It stores the length of the array of _MdfdVec entries.
>
> Oh. "seg_no" seems like not a very good choice of name then.
> Perhaps "md_seg_count" or something like that would be more intelligible.
That's fine with me.
> And personally I'd have made it an int, because we are certainly not doing
> segment-number arithmetic in anything wider than int anywhere else.
Fine with me too. I picked size_t by habit, because there's projects
that don't allow anything else to be used for lengths of memory...
I've, during testing, also noticed it has accidentally introduced a
vfd/memory leak...
So I'll repost a version with those fixes.
Greetings,
Andres Freund
--
Andres Freund http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2014-11-01 17:26:42 | Re: Let's drop two obsolete features which are bear-traps for novices |
Previous Message | Tom Lane | 2014-11-01 17:19:12 | Re: [BUGS] ltree::text not immutable? |