Vacuum process waiting on BufferPin

Поиск
Список
Период
Сортировка
От Don Seiler
Тема Vacuum process waiting on BufferPin
Дата
Msg-id CAHJZqBDsH07idGPhdiMLVWVU5_YSGVo9DiVCFjNq21ZoBcP4Vg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Vacuum process waiting on BufferPin  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Vacuum process waiting on BufferPin  (Don Seiler <don@seiler.us>)
Список pgsql-general
Postgres 9.6.6 on CentOS 7

This afternoon I discovered an autovacuum process that had been running for over 6 days. It was waiting on BufferPin event. I kicked off a manual vacuum+analyze of the table, which automatically killed that autovacuum. This ran for a few minutes before it too was waiting on a BufferPin event. I've never witnessed a vacuum session waiting on BufferPin before.

In pg_locks, I see a handful of sessions that have an AccessShareLock on the table I'm trying to vacuum. My vacuum session has a ShareUpdateExclusiveLock on that relation. All of those sessions look like orphaned reporting sessions sitting "idle in transaction". It's unclear to me why a report job would end up idle in transaction, to my knowledge we don't disable autocommit from the reporting app server.

Anyway, my next step is getting the OK to terminate those idle in transaction sessions to see if that gets my vacuum job moving. Meanwhile I'll ask a dev to sort out why they might be sitting idle in transaction, there's no reason for them to be unless the app server connection died and they are zombies. However I'm curious if there is someplace else I could/should also look to get to the root cause of this.

Don.

--
Don Seiler
www.seiler.us

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

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: JSONB filed with default JSON from a file
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Vacuum process waiting on BufferPin