Re: Separate the attribute physical order from logical order

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: Separate the attribute physical order from logical order
Дата
Msg-id 20220628133856.GA28130@telsasoft.com
обсуждение исходный текст
Ответ на Separate the attribute physical order from logical order  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Separate the attribute physical order from logical order  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-hackers
On Tue, Jun 28, 2022 at 04:32:30PM +0800, Julien Rouhaud wrote:
> psql displays a table columns information using the logical order rather the
> physical order, and if verbose emits an addition "Physical order" footer if the
> logical layout is different from the physical one.

FYI: the footer would work really poorly for us, since we use hundreds of
columns and sometimes over 1000 (historically up to 1600).  I think it'd be
better to show the physical position as an additional column, or a \d option to
sort by physical attnum.  (I'm not sure if it'd be useful for our case to see
the extra columns, but at least it won't create a "footer" which is multiple
pages long.  Actually, I've sometimes wished for a "\d-" quiet mode which would
show everything *except* the list of column names, or perhaps only show those
columns which are referenced by the list of indexes/constraints/stats
objects/etc).

BTW, since 2 years ago, when rewriting partitions to promote a column type, we
recreate the parent table sorted by attlen, to minimize alignment overhead in
new children.  AFAICT your patch is about adding an logical column order, not
about updating tables with a new physical order.

-- 
Justin



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Separate the attribute physical order from logical order
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: Separate the attribute physical order from logical order