Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: wiki Disk Usage, table size: ERROR: could not open relation with OID 0
Дата
Msg-id 5391.1521071095@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: wiki Disk Usage, table size: ERROR: could not open relation withOID 0  (Michael Paquier <michael@paquier.xyz>)
Ответы Re: wiki Disk Usage, table size: ERROR: could not open relation withOID 0
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: wiki Disk Usage, table size: ERROR: could not open relation withOID 0
Следующее
От: chiru r
Дата:
Сообщение: Re: PgBackrest questions