Re: Does having a NULL column automatically exclude the table from the tupleDesc cache?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>
Cc: Ryan Murphy <ryanfmurphy(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Does having a NULL column automatically exclude the table from the tupleDesc cache?
Date: 2017-02-19 10:15:51
Message-ID: CA+Tgmobr7OVgeB=CZvrnk=o+5SpxN2EXTkWOh5ZwBTyrEF7vmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Feb 18, 2017 at 12:33 AM, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com> wrote:
> On 2/15/17 1:37 PM, Ryan Murphy wrote:
>> attcacheoff can only be set positive for fields preceding any varlena
>> (typlen<0, but including the first such) or nullable values. I don't
>> know how much faster it is with the cache; you can measure it if your
>> curiosity is strong enough -- just set the first column to nullable.
>>
>> Thanks! Maybe I'll do some benchmarks.
>
> You'll probably want to do those at a C level, bypassing the executor. I
> would guess that executor overhead will completely swamp the effect of the
> cache in most cases.

That seems like it's kind of missing the point. If the tupleDesc
cache saves so little that it's irrelevant when tested through the
executor, it's not a very useful cache. I bet that's not the case,
though.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-02-19 10:21:06 Re: gitlab post-mortem: pg_basebackup waiting for checkpoint
Previous Message Robert Haas 2017-02-19 10:13:27 Re: Index corruption with CREATE INDEX CONCURRENTLY