Re: [HACKERS] DISCARD ALL (Again)

2014-04-21 Thread Fabrízio de Royes Mello
On Mon, Apr 21, 2014 at 12:00 AM, Stephen Frost wrote: > > * Robert Haas (robertmh...@gmail.com) wrote: > > On Fri, Apr 18, 2014 at 2:24 AM, Tom Lane wrote: > > > 2. While I'm no Python expert, I believe GD is just a specific instance > > > of a general capability for global state in Python. Are

Re: [HACKERS] DISCARD ALL (Again)

2014-04-21 Thread Hannu Krosing
On 04/18/2014 06:44 PM, Joshua D. Drake wrote: > > On 04/18/2014 08:01 AM, Peter Eisentraut wrote: >> >> On 4/17/14, 4:44 PM, Joshua D. Drake wrote: >>> That we should also release the GD? >> >> In some cases, SD or GD are used to cache things. Having the connection >> pooler blow that away would

Re: [HACKERS] DISCARD ALL (Again)

2014-04-21 Thread Hannu Krosing
On 04/18/2014 01:38 AM, Fabrízio de Royes Mello wrote: > > > > On Thu, Apr 17, 2014 at 6:51 PM, Alvaro Herrera > mailto:alvhe...@2ndquadrant.com>> wrote: > > > > It does sounds a legitimate feature request to me. I don't remember if > > we honored the request to add resetting of cached sequences,

Re: [HACKERS] DISCARD ALL (Again)

2014-04-20 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Apr 18, 2014 at 2:24 AM, Tom Lane wrote: > > 2. While I'm no Python expert, I believe GD is just a specific instance > > of a general capability for global state in Python. Are we going to > > promise that any and all user-created data inside

Re: [HACKERS] DISCARD ALL (Again)

2014-04-20 Thread Robert Haas
On Fri, Apr 18, 2014 at 2:24 AM, Tom Lane wrote: > 2. While I'm no Python expert, I believe GD is just a specific instance > of a general capability for global state in Python. Are we going to > promise that any and all user-created data inside Python goes away? > What about other PLs? Will user

Re: [HACKERS] DISCARD ALL (Again)

2014-04-19 Thread Fabrízio de Royes Mello
On Fri, Apr 18, 2014 at 12:00 PM, Peter Eisentraut wrote: > > On 4/17/14, 8:24 PM, Tom Lane wrote: > > We could in fact implement #2, I imagine, by destroying and recreating > > the entire language interpreter. So I could imagine implementing a > > "DISCARD INTERPRETERS" kind of command that woul

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Joshua D. Drake
On 04/18/2014 08:01 AM, Peter Eisentraut wrote: On 4/17/14, 4:44 PM, Joshua D. Drake wrote: That we should also release the GD? In some cases, SD or GD are used to cache things. Having the connection pooler blow that away would defeat the point. Not on a per session basis. Although I can

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Tom Lane
Peter Eisentraut writes: > On 4/17/14, 8:24 PM, Tom Lane wrote: >> We could in fact implement #2, I imagine, by destroying and recreating >> the entire language interpreter. So I could imagine implementing a >> "DISCARD INTERPRETERS" kind of command that would zap the current >> interpreter(s) fo

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Peter Eisentraut
On 4/17/14, 4:44 PM, Joshua D. Drake wrote: > That we should also release the GD? In some cases, SD or GD are used to cache things. Having the connection pooler blow that away would defeat the point. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] DISCARD ALL (Again)

2014-04-18 Thread Peter Eisentraut
On 4/17/14, 8:24 PM, Tom Lane wrote: > We could in fact implement #2, I imagine, by destroying and recreating > the entire language interpreter. So I could imagine implementing a > "DISCARD INTERPRETERS" kind of command that would zap the current > interpreter(s) for whichever PL languages happene

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread David Johnston
On Thursday, April 17, 2014, Joshua D. Drake wrote: > > On 04/17/2014 07:07 PM, David G Johnston wrote: > >> >> On 04/17/2014 05:24 PM, Tom Lane wrote: >> > On the whole I'm not sure this is something we ought to get into. >> > If you really need a fresh session, maybe you should st

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Joshua D. Drake
On 04/17/2014 07:07 PM, David G Johnston wrote: On 04/17/2014 05:24 PM, Tom Lane wrote: > On the whole I'm not sure this is something we ought to get into. > If you really need a fresh session, maybe you should start a > fresh session. Isn't the whole point to avoid the rec

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Stephen Frost
* David G Johnston (david.g.johns...@gmail.com) wrote: > > On 04/17/2014 05:24 PM, Tom Lane wrote: > > > On the whole I'm not sure this is something we ought to get into. > > > If you really need a fresh session, maybe you should start a > > > fresh session. > > > Isn't the whole point to avoid the

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread David G Johnston
> On 04/17/2014 05:24 PM, Tom Lane wrote: > > On the whole I'm not sure this is something we ought to get into. > > If you really need a fresh session, maybe you should start a > > fresh session. > > Isn't the whole point to avoid the reconnection overhead, especially for connection poolers? DISCA

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Tom Lane
"Joshua D. Drake" writes: > On 04/17/2014 05:24 PM, Tom Lane wrote: >> 1. The things that DISCARD ALL resets are explicitly enumerated in its >> documentation page; it is not an open-ended promise to clean up anything >> anybody happens to think of. > Actually, it is. Unless we change the wording

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Joshua D. Drake
On 04/17/2014 05:24 PM, Tom Lane wrote: "Joshua D. Drake" writes: Does it seem reasonable based on the docs: DISCARD ALL: Releases all temporary resources associated with the current session and resets the session to its initial state. That we should also release the GD? There are a couple o

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Tom Lane
"Joshua D. Drake" writes: > Does it seem reasonable based on the docs: > DISCARD ALL: > Releases all temporary resources associated with the current session and > resets the session to its initial state. > That we should also release the GD? There are a couple of reasons why this isn't anywhere

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Fabrízio de Royes Mello
On Thu, Apr 17, 2014 at 6:51 PM, Alvaro Herrera wrote: > > It does sounds a legitimate feature request to me. I don't remember if > we honored the request to add resetting of cached sequences, though; if > we didn't, this one is probably going to be tough too. > +1 > Another point is that to i

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread David G Johnston
Alvaro Herrera-9 wrote > Are we going to backpatch a doc change that says "releases all temporary > resources, except for plptyhon's and plperl's GD"? Surely not ... GD = Global Dictionary I don't see why something like the following wouldn't have value. "For those languages that make use of a

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Alvaro Herrera
Joshua D. Drake wrote: > > On 04/17/2014 02:17 PM, Josh Berkus wrote: > > > >On 04/17/2014 01:44 PM, Joshua D. Drake wrote: > >>Does it seem reasonable based on the docs: > >> > >>DISCARD ALL: > >> > >>Releases all temporary resources associated with the current session and > >>resets the session

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Joshua D. Drake
On 04/17/2014 02:17 PM, Josh Berkus wrote: On 04/17/2014 01:44 PM, Joshua D. Drake wrote: Does it seem reasonable based on the docs: DISCARD ALL: Releases all temporary resources associated with the current session and resets the session to its initial state. That we should also release the

Re: [HACKERS] DISCARD ALL (Again)

2014-04-17 Thread Josh Berkus
On 04/17/2014 01:44 PM, Joshua D. Drake wrote: > Does it seem reasonable based on the docs: > > DISCARD ALL: > > Releases all temporary resources associated with the current session and > resets the session to its initial state. > > That we should also release the GD? It does, but that's a feat