Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate
Дата
Msg-id 25088.1386956692@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate  (anitchakkarwar@gmail.com)
Ответы Re: BUG #8681: column 'n_tup_del' of pg_stat_user_tables doesn't change in case of truncate  (Anit Chakkarwar <anitchakkarwar@gmail.com>)
Список pgsql-bugs
anitchakkarwar@gmail.com writes:
> If I do truncate then n_tup_del value is 0 but all the rows are deleted from
> table.
> Is this something expected behaviour ?

Yes.  We're certainly not going to make TRUNCATE update that count, since
that would require making a pass over the table to count the to-be-deleted
tuples, and the whole point of TRUNCATE is to not make a pass over the
table.

            regards, tom lane

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #8679: Error in regex function
Следующее
От: david fleischhauer
Дата:
Сообщение: permission issues with PostgreSQL 9.2 EnterpriseDB one-click installer on windows 7 causes initcluster to fail