pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedgraceful reload
8+ messages / 4 participants
[nested] [flat]
* graceful reload
@ 2010-06-03 06:23 Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Vasiliy G Tolstov @ 2010-06-03 06:23 UTC (permalink / raw)
To: pgsql-admin
Hello.
I'm use linux and postgresql under xen vps. Vps supports memory balloon
(i need to increase memory some time). Can postgresql server has ability
to graceful reload itself after it configuration files changed?
Thank You.
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
@ 2010-06-03 07:45 ` Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
0 siblings, 1 reply; 8+ messages in thread
From: Anh Ky Huynh @ 2010-06-03 07:45 UTC (permalink / raw)
To: v.tolstov@selfip.ru; +Cc: pgsql-admin
On Thu, 03 Jun 2010 10:23:36 +0400
Vasiliy G Tolstov <v.tolstov@selfip.ru> wrote:
> Hello.
>
> I'm use linux and postgresql under xen vps. Vps supports memory
> balloon (i need to increase memory some time). Can postgresql
> server has ability to graceful reload itself after it configuration
> files changed? Thank You.
I'm afraid *NOT*. You can write a script / cronjob for this task. The script will check postgresql periodically and will restart posgresql daemon in case the configuration was changed. You can use `stat` command (try `stat --help`) to get the right information about file's modifcation. You should *check* if your configuration is valid before restart the daemon as any wrong modification can cause your server to stop :)
I know there's a tool that will do some tasks whenever a(ny) file in the system has been modified. But I can't remember the name of that tool.
Regards,
--
Anh Ky Huynh
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
@ 2010-06-03 07:48 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
0 siblings, 1 reply; 8+ messages in thread
From: Vasiliy G Tolstov @ 2010-06-03 07:48 UTC (permalink / raw)
To: Anh Ky Huynh <xkyanh@gmail.com>; +Cc: pgsql-admin
В Чтв, 03/06/2010 в 14:45 +0700, Anh Ky Huynh пишет:
> On Thu, 03 Jun 2010 10:23:36 +0400
> Vasiliy G Tolstov <v.tolstov@selfip.ru> wrote:
>
> > Hello.
> >
> > I'm use linux and postgresql under xen vps. Vps supports memory
> > balloon (i need to increase memory some time). Can postgresql
> > server has ability to graceful reload itself after it configuration
> > files changed? Thank You.
>
> I'm afraid *NOT*. You can write a script / cronjob for this task. The script will check postgresql periodically and will restart posgresql daemon in case the configuration was changed. You can use `stat` command (try `stat --help`) to get the right information about file's modifcation. You should *check* if your configuration is valid before restart the daemon as any wrong modification can cause your server to stop :)
>
> I know there's a tool that will do some tasks whenever a(ny) file in the system has been modified. But I can't remember the name of that tool.
>
> Regards,
>
Sorry for incorrect question. I mean: does postgresql can be reloaded
without breaking current connections?
For example:
I need to increate some values in postgresql conf file and want to this
valies applied on running server, can i do this without full restart?
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
@ 2010-06-03 07:54 ` Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 08:01 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
0 siblings, 1 reply; 8+ messages in thread
From: Shoaib Mir @ 2010-06-03 07:54 UTC (permalink / raw)
To: v.tolstov@selfip.ru; +Cc: Anh Ky Huynh <xkyanh@gmail.com>; pgsql-admin
On Thu, Jun 3, 2010 at 5:48 PM, Vasiliy G Tolstov <v.tolstov@selfip.ru>wrote:
> Sorry for incorrect question. I mean: does postgresql can be reloaded
> without breaking current connections?
> For example:
> I need to increate some values in postgresql conf file and want to this
> valies applied on running server, can i do this without full restart?
>
>
Which settings you want to change? as there are some which can be done with
just a database reload but some of them cant be done without doing a
database restart (like some memory related settings)
--
Shoaib Mir
http://shoaibmir.wordpress.com/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
@ 2010-06-03 08:01 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 09:15 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 17:07 ` Re: graceful reload Greg Smith <greg@2ndquadrant.com>
0 siblings, 2 replies; 8+ messages in thread
From: Vasiliy G Tolstov @ 2010-06-03 08:01 UTC (permalink / raw)
To: Shoaib Mir <shoaibmir@gmail.com>; +Cc: Anh Ky Huynh <xkyanh@gmail.com>; pgsql-admin
В Чтв, 03/06/2010 в 17:54 +1000, Shoaib Mir пишет:
> On Thu, Jun 3, 2010 at 5:48 PM, Vasiliy G Tolstov
> <v.tolstov@selfip.ru> wrote:
> Sorry for incorrect question. I mean: does postgresql can be
> reloaded
> without breaking current connections?
> For example:
> I need to increate some values in postgresql conf file and
> want to this
> valies applied on running server, can i do this without full
> restart?
>
>
>
> Which settings you want to change? as there are some which can be done
> with just a database reload but some of them cant be done without
> doing a database restart (like some memory related settings)
>
Memory related:
max_connections
shared_buffers
temp_buffers
max_prepared_transactions
work_mem
maintenance_work_mem
max_stack_depth
max_files_per_process
wal_buffers
In config file some in of this settings exists comment line like
"changes require restart". This is mean exactly restart or reload can do
this?
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 08:01 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
@ 2010-06-03 09:15 ` Shoaib Mir <shoaibmir@gmail.com>
1 sibling, 0 replies; 8+ messages in thread
From: Shoaib Mir @ 2010-06-03 09:15 UTC (permalink / raw)
To: v.tolstov@selfip.ru; +Cc: Anh Ky Huynh <xkyanh@gmail.com>; pgsql-admin
On Thu, Jun 3, 2010 at 6:01 PM, Vasiliy G Tolstov <v.tolstov@selfip.ru>wrote:
>
> Memory related:
> max_connections
> shared_buffers
> temp_buffers
> max_prepared_transactions
> work_mem
> maintenance_work_mem
> max_stack_depth
> max_files_per_process
> wal_buffers
>
> In config file some in of this settings exists comment line like
> "changes require restart". This is mean exactly restart or reload can do
> this?
>
>
>
For these you really need a database restart as reload will not help.
--
Shoaib Mir
http://shoaibmir.wordpress.com/
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 08:01 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
@ 2010-06-03 17:07 ` Greg Smith <greg@2ndquadrant.com>
2010-06-04 06:07 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
1 sibling, 1 reply; 8+ messages in thread
From: Greg Smith @ 2010-06-03 17:07 UTC (permalink / raw)
To: v.tolstov@selfip.ru; +Cc: Shoaib Mir <shoaibmir@gmail.com>; Anh Ky Huynh <xkyanh@gmail.com>; pgsql-admin
Vasiliy G Tolstov wrote:
> In config file some in of this settings exists comment line like
> "changes require restart". This is mean exactly restart or reload can do
> this?
>
Run this:
$ psql -c "select name,context from pg_settings"
This will sort out which settings are in which category definitively,
rather than relying on the sometimes ambiguous comments in the file.
Settings that say "postmaster" require a full database restart. Ones
labeled "sighup" can be changed in the postgresql.conf and then the
server signaled to use them, most easily with:
pg_ctl reload
-OR-
psql -c "select pg_reload_conf()"
Ones labeled "user" you can actually change for any user at any time
during their session. Modifying the defaults and then executing the
sighup procedure will make those new defaults active, but not for any
clients that already have open connections.
I recommend using SHOW or looking at pg_settings after making a change
and reloading the server config to confirm it took.
--
Greg Smith 2ndQuadrant US Baltimore, MD
PostgreSQL Training, Services and Support
greg@2ndQuadrant.com www.2ndQuadrant.us
^ permalink raw reply [nested|flat] 8+ messages in thread
* Re: graceful reload
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Re: graceful reload Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Re: graceful reload Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 08:01 ` Re: graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 17:07 ` Re: graceful reload Greg Smith <greg@2ndquadrant.com>
@ 2010-06-04 06:07 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
0 siblings, 0 replies; 8+ messages in thread
From: Vasiliy G Tolstov @ 2010-06-04 06:07 UTC (permalink / raw)
To: Greg Smith <greg@2ndquadrant.com>; +Cc: Shoaib Mir <shoaibmir@gmail.com>; Anh Ky Huynh <xkyanh@gmail.com>; pgsql-admin
В Чтв, 03/06/2010 в 13:07 -0400, Greg Smith пишет:
> Vasiliy G Tolstov wrote:
> > In config file some in of this settings exists comment line like
> > "changes require restart". This is mean exactly restart or reload can do
> > this?
> >
>
> Run this:
>
> $ psql -c "select name,context from pg_settings"
>
> This will sort out which settings are in which category definitively,
> rather than relying on the sometimes ambiguous comments in the file.
> Settings that say "postmaster" require a full database restart. Ones
> labeled "sighup" can be changed in the postgresql.conf and then the
> server signaled to use them, most easily with:
>
> pg_ctl reload
> -OR-
> psql -c "select pg_reload_conf()"
>
> Ones labeled "user" you can actually change for any user at any time
> during their session. Modifying the defaults and then executing the
> sighup procedure will make those new defaults active, but not for any
> clients that already have open connections.
>
> I recommend using SHOW or looking at pg_settings after making a change
> and reloading the server config to confirm it took.
>
Ok, Thank You very much! This is really helpful.
--
Vasiliy G Tolstov <v.tolstov@selfip.ru>
Selfip.Ru
^ permalink raw reply [nested|flat] 8+ messages in thread
end of thread, other threads:[~2010-06-04 06:07 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-06-03 06:23 graceful reload Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:45 ` Anh Ky Huynh <xkyanh@gmail.com>
2010-06-03 07:48 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 07:54 ` Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 08:01 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
2010-06-03 09:15 ` Shoaib Mir <shoaibmir@gmail.com>
2010-06-03 17:07 ` Greg Smith <greg@2ndquadrant.com>
2010-06-04 06:07 ` Vasiliy G Tolstov <v.tolstov@selfip.ru>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox