From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Add comment on why pulling data from a "name" index column can't |
Date: | 2011-10-11 22:41:50 |
Message-ID: | E1RDl1C-0002Jd-J1@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add comment on why pulling data from a "name" index column can't crash.
It's been bothering me for several days that pretending that the cstring
data stored in a btree name_ops column is really a "name" Datum could lead
to reading past the end of memory. However, given the current memory
layout used for index-only scans in the btree code, a crash is in fact not
possible. Document that so we don't break it. I have not thought of any
other solutions that aren't fairly ugly too, and most of them lose the
functionality of index-only scans on name columns altogether, so this seems
like the way to go.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/8c8ba6d11b06e5a8b9fe5653a1cd17c437af5f7b
Modified Files
--------------
src/backend/access/nbtree/nbtree.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2011-10-12 15:24:54 | pgsql: Add Up/Home link to the top of the HTML doc output. |
Previous Message | Tom Lane | 2011-10-11 22:13:15 | pgsql: Generate index-only scan tuple descriptor from the plan node's i |