Re: 答复: autovacuum can not remove dead tuples

Поиск
Список
Период
Сортировка
От Sergei Kornilov
Тема Re: 答复: autovacuum can not remove dead tuples
Дата
Msg-id 2899571522824321@web50j.yandex.ru
обсуждение исходный текст
Ответ на 答复: autovacuum can not remove dead tuples  (石勇虎 <SHIYONGHU651@pingan.com.cn>)
Список pgsql-bugs
Hello
Yes, any session in transaction will prevent vacuum some rows. Regardless DISABLE_PAGE_SKIPPING or any other option,
thisis not bug. Vacuum should not remove any deleted row which can be accessible by any running transaction.
 
You can use idle_in_transaction_session_timeout to prevent long idle in transaction state. But i use simple crontab
likethis:
 
*/10 * * * * psql -d postgres -tx -c "SELECT pg_terminate_backend(pid),now(),now()-xact_start as duration,* from
pg_stat_activitywhere (now() - pg_stat_activity.xact_start) > '1 hour'::interval and usename NOT IN ('postgres') and
state<>'idle'"
to terminate any long running transaction. Time interval changed by database workload, for web requests can be 5min.

regards, Sergei


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

Предыдущее
От: 石勇虎
Дата:
Сообщение: 答复: autovacuum can not remove dead tuples
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #14999: pg_rewind corrupts control file global/pg_control