pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Restart time
6+ messages / 3 participants
[nested] [flat]

* Restart time
@ 2006-12-05 17:08  Jean Arnaud <Jean.Arnaud@inrialpes.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: Jean Arnaud @ 2006-12-05 17:08 UTC (permalink / raw)
  To: pgsql-performance

Hello,

Is there a relation between database size and PostGreSQL restart duration ?
If true, i'm looking for a law predicting how much time is required to 
restart PostGreSQL, depending on the DB size.

Does anyone now the behavior of restart time ?

Thanks

-- 
-- Jean Arnaud




^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Restart time
@ 2006-12-05 18:16  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Jean Arnaud <Jean.Arnaud@inrialpes.fr>
  0 siblings, 1 reply; 6+ messages in thread

From: Tom Lane @ 2006-12-05 18:16 UTC (permalink / raw)
  To: Jean Arnaud <Jean.Arnaud@inrialpes.fr>; +Cc: pgsql-performance

Jean Arnaud <Jean.Arnaud@inrialpes.fr> writes:
> Is there a relation between database size and PostGreSQL restart duration ?

No.

> Does anyone now the behavior of restart time ?

It depends on how many updates were applied since the last checkpoint
before the crash.

If you're talking about startup of a cleanly-shut-down database, it
should be pretty much constant time.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Restart time
@ 2006-12-05 19:32  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 6+ messages in thread

From: Rajesh Kumar Mallah @ 2006-12-05 19:32 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-performance

On 12/5/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Jean Arnaud <Jean.Arnaud@inrialpes.fr> writes:
> > Is there a relation between database size and PostGreSQL restart
> duration ?
>
> No.
>
> > Does anyone now the behavior of restart time ?
>
> It depends on how many updates were applied since the last checkpoint
> before the crash.
>
> If you're talking about startup of a cleanly-shut-down database, it
> should be pretty much constant time.


Dear Sir,

Startup time of a clean shutdown database is constant. But we still
face problem when it comes to shutting down. PostgreSQL waits
for clients to finish gracefully. till date i have never been able to
shutdown
quickly (web application scenerio) and i tend to do pg_ctl -m immediate stop
mostly.


                        regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
>

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Restart time
@ 2006-12-05 19:39  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 1 reply; 6+ messages in thread

From: Tom Lane @ 2006-12-05 19:39 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: pgsql-performance

"Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
> Startup time of a clean shutdown database is constant. But we still
> face problem when it comes to shutting down. PostgreSQL waits
> for clients to finish gracefully. till date i have never been able to
> shutdown
> quickly (web application scenerio) and i tend to do pg_ctl -m immediate stop
> mostly.

RTFM ... you should be using -m fast not -m immediate.  -m immediate
is for emergency situations not routine.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Restart time
@ 2006-12-06 06:20  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Rajesh Kumar Mallah @ 2006-12-06 06:20 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-performance

On 12/6/06, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> "Rajesh Kumar Mallah" <mallah.rajesh@gmail.com> writes:
> > Startup time of a clean shutdown database is constant. But we still
> > face problem when it comes to shutting down. PostgreSQL waits
> > for clients to finish gracefully. till date i have never been able to
> > shutdown
> > quickly (web application scenerio) and i tend to do pg_ctl -m immediate
> stop
> > mostly.
>
> RTFM ... you should be using -m fast not -m immediate.  -m immediate
> is for emergency situations not routine.


Thanks for correcting , -m fast  works fine for me.
I shall RTFM..... :)
Regds
mallah.                        regards, tom lane

^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* Re: Restart time
@ 2006-12-06 08:44  Jean Arnaud <Jean.Arnaud@inrialpes.fr>
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  1 sibling, 0 replies; 6+ messages in thread

From: Jean Arnaud @ 2006-12-06 08:44 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; pgsql-performance

Rajesh Kumar Mallah a écrit :
>
>
> On 12/5/06, *Tom Lane* <tgl@sss.pgh.pa.us <mailto:tgl@sss.pgh.pa.us>> 
> wrote:
>
>     Jean Arnaud <Jean.Arnaud@inrialpes.fr
>     <mailto:Jean.Arnaud@inrialpes.fr>> writes:
>     > Is there a relation between database size and PostGreSQL restart
>     duration ?
>
>     No.
>
>     > Does anyone now the behavior of restart time ?
>
>     It depends on how many updates were applied since the last checkpoint
>     before the crash.
>
>     If you're talking about startup of a cleanly-shut-down database, it
>     should be pretty much constant time.
>
>
> Dear Sir,
>
> Startup time of a clean shutdown database is constant. But we still
> face problem when it comes to shutting down. PostgreSQL waits
> for clients to finish gracefully. till date i have never been able to 
> shutdown
> quickly (web application scenerio) and i tend to do pg_ctl -m 
> immediate stop
> mostly.
>  
>
>                             regards, tom lane
>
Hi

Thanks everybody for answers !

To be sure SGBD will stop before a certain time, I use function that is 
a combination of pg_ctl -m fast to stop most of process cleanly, and 
after few seconds, I send pg_ctl -m immediate to be shut down immediatly 
the system if not already stoped. This works pretty well in practice and 
offers a good compromise between clean and fast shutdown.

Cheers

-- 
--- Jean Arnaud
--- Projet SARDES 
--- INRIA Rhône-Alpes




^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2006-12-06 08:44 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-05 17:08 Restart time Jean Arnaud <Jean.Arnaud@inrialpes.fr>
2006-12-05 18:16 ` Tom Lane <tgl@sss.pgh.pa.us>
2006-12-05 19:32   ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2006-12-05 19:39     ` Tom Lane <tgl@sss.pgh.pa.us>
2006-12-06 06:20       ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2006-12-06 08:44     ` Jean Arnaud <Jean.Arnaud@inrialpes.fr>

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