Re: Set log_lock_waits=on by default

Поиск
Список
Период
Сортировка
От Nikolay Samokhvalov
Тема Re: Set log_lock_waits=on by default
Дата
Msg-id CANNMO+LTYrO35eNsa5qbCf+2UuSRWFYFdORGXwyMe=+Sa_MV1Q@mail.gmail.com
обсуждение исходный текст
Ответ на Set log_lock_waits=on by default  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Set log_lock_waits=on by default  (Jeremy Schneider <schneider@ardentperf.com>)
Список pgsql-hackers
On Thu, Dec 21, 2023 at 05:29 Laurenz Albe <laurenz.albe@cybertec.at> wrote:
Here is a patch to implement this.
Being stuck behind a lock for more than a second is almost
always a problem, so it is reasonable to turn this on by default.

I think it's a very good idea. On all heavily loaded systems I have observed so far, we always have turned it on. 1s (default deadlock_timeout) is quite large value for web/mobile apps, meaning that default frequency of logging is quite low, so any potential suffering from observer effect doesn't happen -- saturation related active session number happens much, much earlier, even if you have very slow disk IO for logging.

At the same time, I like the idea by Robert to separate logging of log waits and deadlock_timeout logic -- the current implementation is a quite confusing for new users. I also had cases when people wanted to log lock waits earlier than deadlock detection. And also, most always lock wait logging lacks the information another the blocking session (its state, and last query, first of all), but is maybe an off topic worthing another effort of improvements.

Nik

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

Предыдущее
От: Bertrand Drouvot
Дата:
Сообщение: Re: Track in pg_replication_slots the reason why slots conflict?
Следующее
От: Alexander Lakhin
Дата:
Сообщение: Re: trying again to get incremental backup