set parameter for all existing session

Started by alex lockalmost 7 years ago3 messageshackers
Jump to latest
#1alex lock
alock303@gmail.com

I check the “alter database, alter role " and "set " command, but none of
them can set the parameters to all the existing sessions. do we have a
way to do that? looks the "assign_hook" can be used to customize this, is
it a right way to do that?

#2Pavel Stehule
pavel.stehule@gmail.com
In reply to: alex lock (#1)
Re: set parameter for all existing session

Hi

st 12. 6. 2019 v 9:58 odesílatel alex lock <alock303@gmail.com> napsal:

I check the “alter database, alter role " and "set " command, but none of
them can set the parameters to all the existing sessions. do we have a
way to do that? looks the "assign_hook" can be used to customize this, is
it a right way to do that?

Maybe you miss to call pg_reload_conf();

example:

alter system set work_mem to '10MB';
select pg_reload_conf();

in other session you can:

show work_mem;

Regards

Pavel

#3alex lock
alock303@gmail.com
In reply to: Pavel Stehule (#2)
Re: set parameter for all existing session

On Wed, Jun 12, 2019 at 4:25 PM Pavel Stehule <pavel.stehule@gmail.com>
wrote:

Hi

st 12. 6. 2019 v 9:58 odesílatel alex lock <alock303@gmail.com> napsal:

I check the “alter database, alter role " and "set " command, but none of
them can set the parameters to all the existing sessions. do we have a
way to do that? looks the "assign_hook" can be used to customize this, is
it a right way to do that?

Maybe you miss to call pg_reload_conf();

example:

alter system set work_mem to '10MB';
select pg_reload_conf();

Thanks, it works!

Show quoted text

in other session you can:

show work_mem;

Regards

Pavel