From: Tomas Vondra <tomas.vondra@enterprisedb.com>
To: Justin Pryzby <pryzby@telsasoft.com>
To: Tomas Vondra <tomas.vondra@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: cache lookup failed for statistics object 123
Date: Thu, 6 May 2021 22:25:06 +0200
Message-ID: <8c78067f-9562-6e78-bf56-b29116e81faf@enterprisedb.com> (raw)
In-Reply-To: <20210505210947.GA27406@telsasoft.com>
References: <20210505210947.GA27406@telsasoft.com>
Hi,
On 5/5/21 11:09 PM, Justin Pryzby wrote:
> Per sqlsmith.
>
> postgres=# SELECT pg_get_statisticsobjdef_expressions(123);
> ERROR: cache lookup failed for statistics object 123
> postgres=# \errverbose
> ERROR: XX000: cache lookup failed for statistics object 123
> LOCATION: pg_get_statisticsobjdef_expressions, ruleutils.c:1762
>
> The expectation is that sql callable functions should return null rather than
> hitting elog().
>
Right, thanks for noticing this.
> In the 003 patch, I wonder if this part should be updated, too:
>
> | ... which can greatly improve query plans that use the expression index.
>
> It can improve queries even that don't use the index, right ?
>
> Say, if a query has f(x) = 11, and the MCV list for the expression shows that
> 50% of the table has f(x)=11, then the query might decide to *not* use an index
> scan.
Yeah, it should talk about improving estimates, it's mostly unrelated to
using indexes.
regards
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: tomas.vondra@enterprisedb.com, pryzby@telsasoft.com, tomas.vondra@postgresql.org
Subject: Re: cache lookup failed for statistics object 123
In-Reply-To: <8c78067f-9562-6e78-bf56-b29116e81faf@enterprisedb.com>
References: <20210505210947.GA27406@telsasoft.com> <8c78067f-9562-6e78-bf56-b29116e81faf@enterprisedb.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox