From: | Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Fix GiST index-only scans for opclasses with different storage t |
Date: | 2015-03-26 21:09:35 |
Message-ID: | E1YbF1z-0004L1-2Z@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Fix GiST index-only scans for opclasses with different storage type.
We cannot use the index's tuple descriptor directly to describe the index
tuples returned in an index-only scan. That's because the index might use
a different datatype for the values stored on disk than the type originally
indexed. As long as they were both pass-by-ref, it worked, but will not work
for pass-by-value types of different sizes. I noticed this as a crash when I
started hacking a patch to add fetch methods to btree_gist.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/55b59eda13a742f8af913734e22ecc8a21754414
Modified Files
--------------
src/backend/access/gist/gistscan.c | 34 +++++++++++++++++++++++++++-------
src/backend/access/gist/gistutil.c | 2 +-
src/include/access/gist_private.h | 2 ++
3 files changed, 30 insertions(+), 8 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2015-03-26 21:22:53 | pgsql: Minor refactoring of btree_gist code. |
Previous Message | Tom Lane | 2015-03-26 18:03:40 | pgsql: Tweak __attribute__-wrapping macros for better pgindent results. |