Skip site navigation (1) Skip section navigation (2)

Re: [bugfix] DISCARD ALL does not release advisory locks

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Merlin Moncure" <mmoncure(at)gmail(dot)com>, "Postgres Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bugfix] DISCARD ALL does not release advisory locks
Date: 2008-11-26 16:06:01
Message-ID: e51f66da0811260806r4ad522dco9b4b63b005743542@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
On 11/26/08, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Merlin Moncure" <mmoncure(at)gmail(dot)com> writes:
>  > On Mon, Nov 24, 2008 at 10:25 AM, Marko Kreen <markokr(at)gmail(dot)com> wrote:
> >> IOW, DISCARD ALL should be functionally equivalent to backend exit.
>
> > Having done a lot of work with advisory locks, I support this change.
>  > Advisory locks are essentially session scoped objects like prepared
>  > statements or notifies.  It's only natural to clean them up in the
>  > same way.
>
>  > That said, I don't think this should be backpatched to 8.3.
>
> Done but not back-patched.

I think this should be back-patched as well:

- The fact that disconnect will clean up used resources has been
  always true, thus most clients assume at some level.

- DISCARD ALL was new feature in 8.3.  It is highly doubtful some
  adv-locks using project has managed to hard-code dependency on
  buggy behaviour of DISCARD.

- The bug was reported by regular user who encountered deadlocks
  on 8.3 because of it.

-- 
marko

In response to

Responses

pgsql-hackers by date

Next:From: Michael MeskesDate: 2008-11-26 16:31:51
Subject: Re: Re: Updated interval patches - ECPG [was,intervalstyle....]
Previous:From: Pavel StehuleDate: 2008-11-26 15:58:11
Subject: Re: what is necessary for filling SysCache?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group