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

2008-11-26 Thread Guillaume Smet
On Wed, Nov 26, 2008 at 9:45 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > Well, the *first* sentence there says it "resets the session to its > initial state", so it seems to me the intent is clear. But maybe we > should alter the second sentence to read, say, "This _currently_ has the > same effect

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

2008-11-26 Thread Tom Lane
"Guillaume Smet" <[EMAIL PROTECTED]> writes: > I kinda agree with you. The only problem IMHO is that we described in > the doc exactly what it does and not simply as the big hammer it was > supposed to be. See > http://www.postgresql.org/docs/8.3/interactive/sql-discard.html . Well, the *first* se

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

2008-11-26 Thread Merlin Moncure
On Wed, Nov 26, 2008 at 3:42 PM, Tom Lane <[EMAIL PROTECTED]> wrote: > Gregory Stark <[EMAIL PROTECTED]> writes: >> "Merlin Moncure" <[EMAIL PROTECTED]> writes: >>> I see your point but there's a pretty high standard for changing >>> existing behavior in bugfix releases. > >> DISCARD ALL was specif

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

2008-11-26 Thread Tom Lane
Gregory Stark <[EMAIL PROTECTED]> writes: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: >> I see your point but there's a pretty high standard for changing >> existing behavior in bugfix releases. > DISCARD ALL was specifically added in 8.3 for the purpose of > connection poolers to be a "big ham

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

2008-11-26 Thread Guillaume Smet
On Wed, Nov 26, 2008 at 8:13 PM, Gregory Stark <[EMAIL PROTECTED]> wrote: > DISCARD ALL was specifically added in 8.3 for the purpose of connection > poolers to be a "big hammer" that exactly emulates a new session. I'm somewhat > skeptical that there are any applications using it directly at all,

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

2008-11-26 Thread Gregory Stark
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > On Wed, Nov 26, 2008 at 11:06 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: >> >> 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.

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

2008-11-26 Thread Robert Haas
> I see your point but there's a pretty high standard for changing > existing behavior in bugfix releases. It's just as likely to introduce > an application bug as to fix one...suppose the application is using > both 'discard all' for prepared statements and advisory locks for > other purposes. Yo

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

2008-11-26 Thread Merlin Moncure
On Wed, Nov 26, 2008 at 11:06 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > > 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 hig

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

2008-11-26 Thread Marko Kreen
On 11/26/08, Tom Lane <[EMAIL PROTECTED]> wrote: > "Merlin Moncure" <[EMAIL PROTECTED]> writes: > > On Mon, Nov 24, 2008 at 10:25 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > >> IOW, DISCARD ALL should be functionally equivalent to backend exit. > > > Having done a lot of work with advisory locks,

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

2008-11-25 Thread Tom Lane
"Merlin Moncure" <[EMAIL PROTECTED]> writes: > On Mon, Nov 24, 2008 at 10:25 AM, Marko Kreen <[EMAIL PROTECTED]> 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 se

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

2008-11-25 Thread Merlin Moncure
On Mon, Nov 24, 2008 at 10:25 AM, Marko Kreen <[EMAIL PROTECTED]> wrote: > On 11/24/08, Tom Lane <[EMAIL PROTECTED]> wrote: >> "Marko Kreen" <[EMAIL PROTECTED]> writes: >> > It was brought to my attention that DISCARD ALL >> > does not release advisory locks: >> >> What is the argument that it sh

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

2008-11-24 Thread Marko Kreen
On 11/24/08, Tom Lane <[EMAIL PROTECTED]> wrote: > "Marko Kreen" <[EMAIL PROTECTED]> writes: > > It was brought to my attention that DISCARD ALL > > does not release advisory locks: > > What is the argument that it should? DISCARD ALL is supposed to be used by poolers to reset connection back to

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

2008-11-24 Thread Tom Lane
"Marko Kreen" <[EMAIL PROTECTED]> writes: > It was brought to my attention that DISCARD ALL > does not release advisory locks: What is the argument that it should? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to

[HACKERS] [bugfix] DISCARD ALL does not release advisory locks

2008-11-24 Thread Marko Kreen
It was brought to my attention that DISCARD ALL does not release advisory locks: http://pgfoundry.org/tracker/index.php?func=detail&aid=1010499&group_id=1000258&atid=983 Thus connection managers / poolers need to do that manually. This obviously means DISCARD ALL needs fixing. Applied patch