Use TableAm API in pg_table_size

Поиск
Список
Период
Сортировка
От Georgios
Тема Use TableAm API in pg_table_size
Дата
Msg-id qzfAa10e5AbhOq0M7O4g-uXfn0E-sKyL1W6Lj6-4Eifz0bujH6OGYqBDvmo9wx3T1Twau-3z3PL383IL4NQPQ9oPj6IJYJgfboeuTB0FJM0=@protonmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi,

I noticed that there are several file layout assumptions in dbsize.c which might not hold true for non heap relations attached with the TableAm API. It seems logical that in order to retrieve the disk size of a relation, the existing size method to be used instead.

A small patch is included to demonstrate how such an implementation can look like. Also, the existing method for heap, table_block_relation_size, should be able to address the valid cases where a fork number does not exist.

If this is considered valid, then the same can be applied for indexes too. The more generic calculate_relation_size can be adapted to call into the TableAm for those kinds of relations that makes sense. If agreed, a more complete patch can be provided.

Cheers,
//Georgios


Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: snowball ASCII stemmer configuration
Следующее
От: Marc Cousin
Дата:
Сообщение: slow get_actual_variable_range with long running transactions