Thread: How to get around this limitation (ALTER DATABASE db SET search_path = ...)

How to get around this limitation (ALTER DATABASE db SET search_path = ...)

From
"David Johnston"
Date:

Hi,

 

From the documentation:

 

“Whenever a new session is subsequently started in that database, the specified value becomes the session default value.”

 

Is there some way to get existing sessions to see the new search_path without forcing them to reconnect.

 

Thanks,

 

David J.

 

 

 

 

 

 

Re: How to get around this limitation (ALTER DATABASE db SET search_path = ...)

From
Scott Marlowe
Date:
On Thu, Sep 1, 2011 at 1:24 PM, David Johnston <polobo@yahoo.com> wrote:
> Hi,
>
>
>
> From the documentation:
>
> “Whenever a new session is subsequently started in that database, the
> specified value becomes the session default value.”
>
> Is there some way to get existing sessions to see the new search_path
> without forcing them to reconnect.

Think about what you're asking.  Imagine you're in the middle of a
transaction using one search path, and suddenly, mid transaction it
just changes.  I don't think you can force it without killing off the
backend the other user's are attached to and forcing them to
reconnect.