Re: DISCARD ALL (Again)

Поиск
Список
Период
Сортировка
От Joshua D. Drake
Тема Re: DISCARD ALL (Again)
Дата
Msg-id 53507432.9070603@commandprompt.com
обсуждение исходный текст
Ответ на Re: DISCARD ALL (Again)  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: DISCARD ALL (Again)  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: DISCARD ALL (Again)  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-hackers
On 04/17/2014 05:24 PM, Tom Lane wrote:
> "Joshua D. Drake" <jd@commandprompt.com> 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 near as
> open-and-shut as you seem to think:
>
> 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 in the documentation 
because right now, DISCARD ALL states that it will return the session 
back to its initial state. It does not do that.

[... snipping technical details for those who would be better at arguing 
than I ... ]

>
> 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.

This isn't nearly as simple as it sounds. That said, the work around we 
came up with was to have server_reset_query in pg_bouncer call a 
function called discard_gd() that explicitly discards the GD for that 
session.

> But if we are going to get into it, I think the
> permissions aspect needs some careful thought.
>

Agreed.

Sincerely,

JD

-- 
Command Prompt, Inc. - http://www.commandprompt.com/  509-416-6579
PostgreSQL Support, Training, Professional Services and Development
High Availability, Oracle Conversion, Postgres-XC, @cmdpromptinc
Political Correctness is for cowards.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DISCARD ALL (Again)
Следующее
От: Tom Lane
Дата:
Сообщение: Re: DISCARD ALL (Again)