~1.8Tb
А вот запрос
WITH w_sizes AS (SELECT
schema_name,
relname,
pg_size_pretty(table_size) AS size,
table_size
FROM (
SELECT
pg_catalog.pg_namespace.nspname AS schema_name,
relname,
pg_relation_size(pg_catalog.pg_class.oid) AS table_size
FROM pg_catalog.pg_class
JOIN pg_catalog.pg_namespace ON relnamespace = pg_catalog.pg_namespace.oid
) t
ORDER BY table_size DESC)
SELECT SUM(w_sizes.table_size) FROM w_sizes;
показывает кол-во байт, равное 1.4 Tb
Где эта самая разница в 500GB почти затеряться может?
postgres - 14.6
pg_relation_size ( relation regclass [, fork text ] ) → bigint Computes the disk space used by one “fork” of the specified relation. (Note that for most purposes it is more convenient to use the higher-level functions pg_total_relation_size or pg_table_size, which sum the sizes of all forks.) With one argument, this returns the size of the main data fork of the relation. Остальное Вы не посчитали, получается.
Обсуждают сегодня