From: Andres Freund <andres@2ndquadrant.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Subject: Re: _mdfd_getseg can be expensive
Date: Sat, 1 Nov 2014 18:23:47 +0100
Message-ID: <20141101172347.GP13584@awork2.anarazel.de> (raw)
In-Reply-To: <5725.1414861060@sss.pgh.pa.us>
References: <20140331101001.GE13135@alap3.anarazel.de>
<20141031223210.GN13584@awork2.anarazel.de>
<12336.1414795725@sss.pgh.pa.us>
<20141031225851.GO13584@awork2.anarazel.de>
<5725.1414861060@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 2014-11-01 12:57:40 -0400, Tom Lane wrote:
> Andres Freund <andres@2ndquadrant.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
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: andres@2ndquadrant.com, tgl@sss.pgh.pa.us
Subject: Re: _mdfd_getseg can be expensive
In-Reply-To: <20141101172347.GP13584@awork2.anarazel.de>
References: <20140331101001.GE13135@alap3.anarazel.de> <20141031223210.GN13584@awork2.anarazel.de> <12336.1414795725@sss.pgh.pa.us> <20141031225851.GO13584@awork2.anarazel.de> <5725.1414861060@sss.pgh.pa.us> <20141101172347.GP13584@awork2.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox