Re: proposal - patch: psql - sort_by_size
От | Fabien COELHO |
---|---|
Тема | Re: proposal - patch: psql - sort_by_size |
Дата | |
Msg-id | alpine.DEB.2.21.1907311536510.32534@lancre обсуждение исходный текст |
Ответ на | Re: proposal - patch: psql - sort_by_size (Jeremy Finzel <finzelj@gmail.com>) |
Список | pgsql-hackers |
Hello Jeremy, >> Comments, notes? > > One oddity about pg_relation_size and pg_table_size is that they can be > easily blocked by user activity. In fact it happens to us often in > reporting environments and we have instead written different versions of > them that avoid the lock contention and still give "close enough" results. > > This blocking could result in quite unexpected behavior, that someone uses > your proposed command and it never returns. Has that been considered as a > reality at least to be documented? ISTM that it does not change anything wrt the current behavior because of the prudent lazy approach: the sorting is *only* performed when the size is already available in one of the printed column. Maybe the more general question could be "is there a caveat somewhere that when doing \d.+ a user may have issues with locks because of the size computations?". -- Fabien.
В списке pgsql-hackers по дате отправления: