Re: Vacuum process waiting on BufferPin - Mailing list pgsql-general

From Vick Khera
Subject Re: Vacuum process waiting on BufferPin
Date
Msg-id CALd+dceTTCsrfOh5BjLos3Rim+GTS0iCDiA0t9L-J-Uv+O-Bpg@mail.gmail.com
Whole thread Raw
In response to Re: Vacuum process waiting on BufferPin  (Don Seiler <don@seiler.us>)
Responses Re: Vacuum process waiting on BufferPin
List pgsql-general
On Tue, Aug 14, 2018 at 9:21 AM, Don Seiler <don@seiler.us> wrote:
On Mon, Aug 13, 2018 at 5:55 PM, Vick Khera <vivek@khera.org> wrote:
On Mon, Aug 13, 2018 at 5:19 PM, Don Seiler <don@seiler.us> wrote:

I don't quite follow this. What circumstances would lead to this situation?

BEGIN WORK;
DECLARE CURSOR ... ;
FETCH ...;  -- for some number of fetches, which does not reach the end of the cursor.

then just sit there idle, without having closed the cursor or fetching anything more.

So the fix in that case would be to ensure that they CLOSE the cursors when done with them?


The general fix is to never sit idle in transaction, but this specific case closing the cursor seems like it will also do it.

pgsql-general by date:

Previous
From: Don Seiler
Date:
Subject: Re: Vacuum process waiting on BufferPin
Next
From: Don Seiler
Date:
Subject: Re: Vacuum process waiting on BufferPin