Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL
Дата
Msg-id CANP8+j+w3aAv8OpNtRxhf=ZKV5fXtVuRJ+=5HJuhiWHXvHW5sA@mail.gmail.com
обсуждение исходный текст
Ответы Re: Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL  (Robert Haas <robertmhaas@gmail.com>)
Re: Bug in VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-hackers
In vacuumlazy.c, VACUUM_TRUNCATE_LOCK_WAIT_INTERVAL is described as
being in ms on line 85, yet it is used on line 1759 in a call to
pg_usleep, so is treated as microseconds rather than milliseconds.

As a result, the timeout during lazy_truncate_heap() is actually only
5ms long, not 5s long.

So this looks to me like a bug, patch attached, for back-patching to 9.1
vacuum_lock_wait_ms.v1,patch

Objections?



Note that VACUUM_TRUNCATE_LOCK_CHECK_INTERVAL is described as being in
ms and is actually in ms, so no change there.


I'm also wondering why we don't use lock_timeout when the user sets it?
Not a bug, but patch attached anyway.
vacuum_truncate_use_lock_timeout.v1.patch

--
Simon Riggs                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: Craig Ringer
Дата:
Сообщение: Re: Override compile time log levels of specific messages/modules
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: PATCH: Batch/pipelining support for libpq