Skip site navigation (1) Skip section navigation (2)

Re: [PATCHES] Eliminate more detoast copies for packed varlenas

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "PostgreSQL-development Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCHES] Eliminate more detoast copies for packed varlenas
Date: 2007-09-24 14:15:01
Message-ID: 87abrcf8uy.fsf@oxford.xeocode.com (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> (It might be interesting to make textin produce a packed result when
> possible, just to see what breaks; but I would be afraid to try to do
> that for production...)

Reassuringly all checks pass with a hack like that in place. (attached)

I think the right approach here is to define a new type text_packed * (which
would just be a char* or varattrib_1b* or something like that). Then
PG_GETARG_*_PP would return one of these new pointers.

This does leave us with warnings whenever an old-style function calls a
new-style function but I think there would be relatively few of those since
we'll tackle the higher traffic areas first which will be the lower level
functions.

The benefit is that it will give us a warning if we try to pass a pointer from
a new-style function to an old-style function which isn't prepared to receive
it.


Attachment: debug-packed-varlena_v0.patch
Description: text/x-diff (832 bytes)

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-09-24 14:32:19
Subject: Re: Bytea as C string in pg_convert?
Previous:From: Dave PageDate: 2007-09-24 13:18:38
Subject: Re: CREATE DATABASE cannot be executed from a function or multi-command string

pgsql-patches by date

Next:From: ITAGAKI TakahiroDate: 2007-09-25 01:07:41
Subject: Re: ilike multi-byte pattern cache
Previous:From: Simon RiggsDate: 2007-09-24 10:30:37
Subject: Re: [HACKERS] 'Waiting on lock'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group