Re: DISCARD ALL (Again)

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: DISCARD ALL (Again)
Date: 2014-04-17 23:01:17
Message-ID: 1397775677063-5800640.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabrízio de Royes Mello 2014-04-17 23:38:01 Re: DISCARD ALL (Again)
Previous Message Alvaro Herrera 2014-04-17 21:51:21 Re: DISCARD ALL (Again)