pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Mariel Cherkassky <mariel.cherkassky@gmail.com>
To: PostgreSQL mailing lists <pgsql-performance@postgresql.org>
Subject: Re: pgstattuple_approx for toasted table
Date: Mon, 04 Mar 2019 06:21:39 +0100
Message-ID: <43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at> (raw)
In-Reply-To: <CA+t6e1kTYbcQY4ohOS-OUvyu5T+=PTj_TZKvyMBeCS5V6V7ZFA@mail.gmail.com>
References: <CA+t6e1kTYbcQY4ohOS-OUvyu5T+=PTj_TZKvyMBeCS5V6V7ZFA@mail.gmail.com>

Mariel Cherkassky wrote:
> I was testing pgstattuple and I realized that pgstattuple is working on toasted table but pgstattuple_approx is raising the next error msg : 
> 
> ERROR:  "pg_toast_18292" is not a table or materialized view
> 
> ahm, is that because the pgstattuple_approx uses visibility map ? Can someone explain ? tnx.

You are right; here is the code:

    /*
     * We support only ordinary relations and materialised views, because we
     * depend on the visibility map and free space map for our estimates about
     * unscanned pages.
     */
    if (!(rel->rd_rel->relkind == RELKIND_RELATION ||
          rel->rd_rel->relkind == RELKIND_MATVIEW))
        ereport(ERROR,
                (errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
                 errmsg("\"%s\" is not a table or materialized view",
                        RelationGetRelationName(rel))));

Yours,
Laurenz Albe

-- 
Cybertec | https://www.cybertec-postgresql.com





view thread (2+ messages)

Message-ID: <43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at>
Permalink:  ../43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at/
Also on:    postgresql.org/message-id/43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: laurenz.albe@cybertec.at, mariel.cherkassky@gmail.com
  Subject: Re: pgstattuple_approx for toasted table
  In-Reply-To: <43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at>

* 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