From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: session persistent data for plperl |
Date: | 2004-02-08 19:52:17 |
Message-ID: | 40269371.8000502@dunslane.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
As Tom Lane noted, pltcl already allows this. In fact, it appears that
plperl already allows functions to create their own session-persistent
data, but doesn't share data between functions.
I guess there's a philosophical question: should we apply transactional
safety to (transient) data not stored in the database? I can see both
sides of the argument, but have no motivation myself to provide such
transactional safety, at least not now.
cheers
andrew
Thomas Hallgren wrote:
>What about transactions? Let's say the first call was in a transaction
>that's been rolled back. Semantically, that means the call never happened.
>If you maintain the session data in a table, everything is fine of course.
>But if it's in memory the solution has some rather nasty implications to it.
>
>This is one scenario where I think it would be useful if the backend
>provided some transaction callback mechanisms (discussed in this group
>earlier under topic "Transaction callback"). That would enable the
>implementation of "transaction aware session persistent data" in memory.
>
>Regards,
>
>- thomas
>
>"Andrew Dunstan" <andrew(at)dunslane(dot)net> wrote in message
>news:402672F4(dot)4050905(at)dunslane(dot)net(dot)(dot)(dot)
>
>
>>The attached tiny patch (not intended for application yet) provides a
>>space for plperl functions to create and share session persistent data,
>>which I should think would increase the utility of plperl. Essentially
>>it creates a hash called %session_globals which it then injects into the
>>safe container where plperl functions live.
>>
>>Comments are welcome - this is just a proof of concept. If this seems
>>good to people, I will try to use a similar mechanism to "register"
>>plperl functions so they can call each other.
>>
>>
>>
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Hallgren | 2004-02-08 19:56:24 | Re: session persistent data for plperl |
Previous Message | Andreas Pflug | 2004-02-08 19:07:14 | Re: RFC: Very large scale postgres support |