From: Simon Riggs <simon@2ndQuadrant.com>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Jim Nasby <jim@nasby.net>
Cc: pgsql-hackers Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Confusing comment in TransactionIdIsInProgress
Date: Wed, 19 Jan 2011 10:06:09 +0000
Message-ID: <1295431569.3282.8710.camel@ebony> (raw)
In-Reply-To: <4D3554A0.5040205@enterprisedb.com>
References: <60BA971A-52A4-4A11-9AA1-0839BB6F15A3@nasby.net>
<4D3554A0.5040205@enterprisedb.com>
On Tue, 2011-01-18 at 10:51 +0200, Heikki Linnakangas wrote:
> On 18.01.2011 07:15, Jim Nasby wrote:
> > Shouldn't the comment read "If first time through"?
> >
> > /*
> > * If not first time through, get workspace to remember main XIDs in. We
> > * malloc it permanently to avoid repeated palloc/pfree overhead.
> > */
> > if (xids == NULL)
> > {
> > ...
> > xids = (TransactionId *) malloc(maxxids * sizeof(TransactionId));
>
> Huh, yes, I'm amazed that no-one have noticed. I must've read that piece
> of code dozens of times in the last couple of years myself, and that
> sentence was even copy-pasted to GetConflictingVirtualXIDs() later in
> that file, including that thinko.
Yes, I laughed when I saw that, having camped out in that code many
nights.
--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services
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 using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: simon@2ndQuadrant.com, heikki.linnakangas@enterprisedb.com, jim@nasby.net
Subject: Re: Confusing comment in TransactionIdIsInProgress
In-Reply-To: <1295431569.3282.8710.camel@ebony>
* 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