Re: DISCARD ALL (Again) - Mailing list pgsql-hackers

From David G Johnston
Subject Re: DISCARD ALL (Again)
Date
Msg-id 1397775677063-5800640.post@n5.nabble.com
Whole thread Raw
In response to Re: DISCARD ALL (Again)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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 Global Dictionary (or other global)
construct to maintain state across function calls the content of these
global constructs may not be reset upon a call to DISCARD ALL - please see
your language's documentation for specifics.".

Then, more attention should be made within the language sections both to the
constructs in general and also their limitations in the face of DISCARD ALL.

"Note, the session-level GD construct is not informed of the execution of
DISCARD ALL and thus is not cleared when such is executed."

It would be helpful to note any work-around options as well.

It sounds like, generally, PostgreSQL should promise to notify each
language/session of a pending DISCARD ALL and then leave it up to the
language to define how it will respond.  The documentation should reflect
this promise/action division-of-responsibilities.

David J.












--
View this message in context: http://postgresql.1045698.n5.nabble.com/DISCARD-ALL-Again-tp5800623p5800640.html
Sent from the PostgreSQL - hackers mailing list archive at Nabble.com.



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: DISCARD ALL (Again)
Next
From: Fabrízio de Royes Mello
Date:
Subject: Re: DISCARD ALL (Again)