pgsql: Fix incorrect loop counts in tidbitmap.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix incorrect loop counts in tidbitmap.c.
Date: 2013-11-15 23:35:15
Message-ID: E1VhSux-0005pa-I2@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix incorrect loop counts in tidbitmap.c.

A couple of places that should have been iterating over WORDS_PER_CHUNK
words were iterating over WORDS_PER_PAGE words instead. This thinko
accidentally failed to fail, because (at least on common architectures
with default BLCKSZ) WORDS_PER_CHUNK is a bit less than WORDS_PER_PAGE,
and the extra words being looked at were always zero so nothing happened.
Still, it's a bug waiting to happen if anybody ever fools with the
parameters affecting TIDBitmap sizes, and it's a small waste of cycles
too. So back-patch to all active branches.

Etsuro Fujita

Branch
------
REL8_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/6765a2c96af49dbbd5391804100cae5eedadb94b

Modified Files
--------------
src/backend/nodes/tidbitmap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2013-11-16 00:41:17 pgsql: Remove pgbench's hardwired limit on line length in custom script
Previous Message Tom Lane 2013-11-15 23:02:12 pgsql: Speed up printing of INSERT statements in pg_dump.