From: Tom Lane <tgl@sss.pgh.pa.us>
To: Michael Paquier <michael@paquier.xyz>
Cc: Hans Schou <hans.schou@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0
Date: Wed, 14 Mar 2018 19:44:55 -0400
Message-ID: <5391.1521071095@sss.pgh.pa.us> (raw)
In-Reply-To: <20180314233238.GB617@paquier.xyz>
References: <CAApBw37QdLBn0bE=OykDnn1BUJmz_rDBHcs3bWfbTScQ6cDg3A@mail.gmail.com>
<20180314233238.GB617@paquier.xyz>
Michael Paquier <michael@paquier.xyz> writes:
> On Wed, Mar 14, 2018 at 04:17:54PM +0100, Hans Schou wrote:
>> I got the message
>> ERROR: could not open relation with OID 0
>> when running the "General Table Size Information" from
>> https://wiki.postgresql.org/wiki/Disk_Usage>> I'm running version 9.1.9 so it should be working according to the
>> wiki.
> You should update and upgrade. 9.1 has fallen out of community support
> 1 year and a half ago, and 9.1.9 is utterly outdated.
The query does fail on < 9.2, because on rows with no reltoastrelid
it will call pg_total_relation_size(0), and we didn't make those
functions forgiving of bogus OIDs until 9.2.
Given that pre-9.2 is well out of support I didn't feel like complicating
the query to handle that; what I did do was change the labeling to say
"works with >= 9.2" instead of "works with >= 9.0". But hey, it's a wiki;
if you feel more ambitious, edit away.
regards, tom lane
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-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, michael@paquier.xyz, hans.schou@gmail.com
Subject: Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0
In-Reply-To: <5391.1521071095@sss.pgh.pa.us>
References: <CAApBw37QdLBn0bE=OykDnn1BUJmz_rDBHcs3bWfbTScQ6cDg3A@mail.gmail.com> <20180314233238.GB617@paquier.xyz> <5391.1521071095@sss.pgh.pa.us>
* 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