Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0g39-0000FT-GC for pgsql-performance@arkaria.postgresql.org; Mon, 04 Mar 2019 05:22:04 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h0g36-0006Js-FJ for pgsql-performance@arkaria.postgresql.org; Mon, 04 Mar 2019 05:22:00 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0g36-0006Jl-6M for pgsql-performance@lists.postgresql.org; Mon, 04 Mar 2019 05:22:00 +0000 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h0g2z-0002hP-5r for pgsql-performance@postgresql.org; Mon, 04 Mar 2019 05:21:59 +0000 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id CB9E04B781; Mon, 4 Mar 2019 06:21:49 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec.at; s=MBO0001; t=1551676908; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jYCiH+E8TU966aWzNDN1gYNpzFJ5IrUcb9z99djz/0k=; b=YUJHkXLo4+odKFS+/nGw3aign+ldAYbWV1Qonwi2pgLwKa7IL9PkpyiSdXciRvmySSApMe cqAFDx3d1x7wET2as4hGryO7WdNj+BoWB7HloVVbzGAgQc0FKlRIskIdJ5jZ3k/pDH5vbx oWqdyA/g/WcbXm7zFw+ziNbNdgNVjIJxxYyk5A/Osu86w9NE6lb7YbkOCl/wmK0qFxNpAJ 5qNS/VD/iDaGKME8xD9xbERALh5O6sHh2hqZqckM6oBf9XoUOxMpfCIYUPcHfQtCoNec1t auWS0RunBt+4L17hEgGatqu7Oac/H2bST1oiMo0BqdpLYw73d9DeeLO470iKaw== Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id Faib1uJzlrJI; Mon, 4 Mar 2019 06:21:40 +0100 (CET) Message-ID: <43864a0e35504ffc6047dd90eaf648287ed75e65.camel@cybertec.at> Subject: Re: pgstattuple_approx for toasted table From: Laurenz Albe To: Mariel Cherkassky , PostgreSQL mailing lists Date: Mon, 04 Mar 2019 06:21:39 +0100 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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