On Mon, Aug 13, 2018 at 5:19 PM, Don Seiler <d...@seiler.us> wrote: > On Mon, Aug 13, 2018 at 4:15 PM, Alvaro Herrera <alvhe...@2ndquadrant.com> > wrote: > >> >> Maybe you had a cursor that was not fully scanned before the session was >> left idle -- as I recall, those can leave buffers pinned. >> > > 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.