Re: \dt+ sizes don't include TOAST data

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: \dt+ sizes don't include TOAST data
Дата
Msg-id 201002052135.o15LZdR16759@momjian.us
обсуждение исходный текст
Ответ на Re: \dt+ sizes don't include TOAST data  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-general
Alvaro Herrera wrote:
> Tom Lane wrote:
> > Greg Smith <greg@2ndquadrant.com> writes:
> > > Florian Weimer wrote:
> > >> The sizes displayed by \dt+ in version 8.4.2 do not take TOAST tables
> > >> into account, presumably because the pg_relation_size does not reflect
> > >> that, either.  I think this is a bit surprising.  From a user
> > >> perspective, these are part of the table storage (I understand that
> > >> the indices might be a different story, but TOAST table are a fairly
> > >> deep implementation detail and should perhaps be hidden here).
> >
> > > As of last week there's a new pg_table_size available that does what you
> > > want here:
> > > http://archives.postgresql.org/pgsql-committers/2010-01/msg00288.php
> >
> > > I don't believe \dt+ has been updated yet to use that though; that's
> > > worth considering for a minute, not sure anybody thought about it yet.
> >
> > We could only use pg_table_size against a backend >= 9.0, which would
> > mean that the displayed results mean something different depending on
> > which backend version psql is being used with.  That's not necessarily
> > a deal-breaker, but it does seem a bit evil.
>
> Perhaps we can emulate pg_table_size on earlier server versions, using a
> query which provides the sum of table plus toast items.  It would be a
> bit slower, but the normal case of using the same server version would
> be fast.

Added to TODO:

    Consider showing TOAST and index sizes in \dt+

        * http://archives.postgresql.org/pgsql-general/2010-01/msg00912.php

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

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

Предыдущее
От: Sebastian Hennebrueder
Дата:
Сообщение: Re: PostgreSQL + Hibernate, Apache Mod Security, SQL Injection and you (a love story)
Следующее
От: Josh Kupershmidt
Дата:
Сообщение: Re: Understanding pg_stat_user_indexes