From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix end-of-loop optimization in pglz_find_match() function. |
Date: | 2013-07-17 17:37:34 |
Message-ID: | E1UzVfS-0007el-5R@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix end-of-loop optimization in pglz_find_match() function.
After the recent pglz optimization patch, the next/prev pointers in the
hash table are never NULL, INVALID_ENTRY_PTR is used to represent invalid
entries instead. The end-of-loop check in pglz_find_match() function didn't
get the memo. The result was the same from a correctness point of view, but
because the NULL-check would never fail, the tiny optimization turned into
a pessimization.
Reported by Stephen Frost, using Coverity scanner.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/3f2adace1ec025908b5189f0773b4eaab3d228d5
Modified Files
--------------
src/backend/utils/adt/pg_lzcompress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-07-17 20:24:06 | pgsql: Fix assert failure at end of recovery, broken by XLogInsert scal |
Previous Message | Heikki Linnakangas | 2013-07-17 17:36:44 | Re: pgsql: Optimize pglz compressor for small inputs. |