Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ust2S-0005Ow-Th for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 11:09:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Ust2S-00041V-DV for pgsql-hackers@arkaria.postgresql.org; Sat, 29 Jun 2013 11:09:56 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ust2Q-00041O-Sd for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 11:09:54 +0000 Received: from mail-wg0-x22f.google.com ([2a00:1450:400c:c00::22f]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ust2N-0006sE-Q6 for pgsql-hackers@postgresql.org; Sat, 29 Jun 2013 11:09:54 +0000 Received: by mail-wg0-f47.google.com with SMTP id l18so2392250wgh.14 for ; Sat, 29 Jun 2013 04:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=4ozar1QXrgbujbdCshaGKJS1KY7NsAC/RmgUll8WONM=; b=LcVmw10lEL+vTix3XlkVEVGLyBpWDXqcCN3aBQqIKx7rL4DQHpQXOLJ2NDkZc00SCQ 6AdupDxxfAW3Mdz4rPYY94lQWwrpHHYlUa+RXUgu4HTqnpxQ0n13s6T6yKpEdMT0D5/0 xiR53ckVhHeNRgrGMLasWLyac1ilkO4cOziEu+GigrFcYV9QEhtm1tfSY1NXEPV1JWco hvKoMIHjZWlp9Rr5xNr2QMrt7D/NuFBdEI99zLt3cbMrYaBs4YT8n+r7pAfRQcAmUUYm +DUbsOybnO0tdecnss2IsjEZiq3m5rGDmJdDz+PV59cp00Q7xXDpQZWV29frc6npLEMP b4HQ== X-Received: by 10.194.216.99 with SMTP id op3mr13755298wjc.52.1372504190924; Sat, 29 Jun 2013 04:09:50 -0700 (PDT) Received: from [192.168.0.164] (snat.spoje.net. [77.87.240.6]) by mx.google.com with ESMTPSA id ci50sm16370872eeb.12.2013.06.29.04.09.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 29 Jun 2013 04:09:49 -0700 (PDT) Message-ID: <51CEC07C.4000408@gmail.com> Date: Sat, 29 Jun 2013 13:09:48 +0200 From: Antonin Houska User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6 MIME-Version: 1.0 To: Heikki Linnakangas CC: pgsql-hackers@postgresql.org Subject: Re: GIN improvements part 1: additional information References: <51CC4A44.2080905@gmail.com> <51CEA214.8090805@vmware.com> In-Reply-To: <51CEA214.8090805@vmware.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.0 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 06/29/2013 11:00 AM, Heikki Linnakangas wrote: > On 27.06.2013 17:20, Antonin Houska wrote: >> I was curious about the new layout of the data page, so I spent a while >> looking into the code. >> It's interesting, but I suspect 2 things are not o.k.: >> >> * gindatapage.c:dataIsEnoughSpace() - 'i++' in the for loop should >> probably be 'j++', otherwise it loops forever > > Hmm. It won't loop forever, i is counting the number of entries that > fit on the page, while j is used to loop through the items being > added. However, i isn't actually used for anything (and isn't > initialized either), so it's just dead code. > > - Heikki You're right. While thinking about possible meaning of the 'i' I didn't notice that j++ is in the 'for' construct. Stupid mistake on my side. Tony -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers