pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Automatic shutdown from Linux.
5+ messages / 4 participants
[nested] [flat]

* Automatic shutdown from Linux.
@ 2003-05-09 12:25 dlangschied <dlangschied@ameritech.net>
  2003-05-09 12:56 ` Re: Automatic shutdown from Linux. Bruno Wolff III <bruno@wolff.to>
  2003-05-09 13:21 ` Re: Automatic shutdown from Linux. David W Noon <dwnoon@spamtrap.ntlworld.com>
  0 siblings, 2 replies; 5+ messages in thread

From: dlangschied @ 2003-05-09 12:25 UTC (permalink / raw)
  To: pgsql-admin

Hi all!
I would like to automate the shutdown of my postgres database, just as I do
with my startup.  I have looked through the docs and I can't find anything
that addresses this issue.  I am sure that there are many out there who
don't manually shutdwon the database prior to a system shutdown/reboot.
Please advise.
Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied@ameritech.net




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

* Re: Automatic shutdown from Linux.
  2003-05-09 12:25 Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
@ 2003-05-09 12:56 ` Bruno Wolff III <bruno@wolff.to>
  2003-05-09 13:00   ` Re: Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
  2003-05-09 13:04   ` Re: Automatic shutdown from Linux. Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 2 replies; 5+ messages in thread

From: Bruno Wolff III @ 2003-05-09 12:56 UTC (permalink / raw)
  To: dlangschied <dlangschied@ameritech.net>; +Cc: pgsql-admin

On Fri, May 09, 2003 at 08:25:53 -0400,
  dlangschied <dlangschied@ameritech.net> wrote:
> Hi all!
> I would like to automate the shutdown of my postgres database, just as I do
> with my startup.  I have looked through the docs and I can't find anything
> that addresses this issue.  I am sure that there are many out there who
> don't manually shutdwon the database prior to a system shutdown/reboot.
> Please advise.
> Sincerely,

Probably the init scripts for your system already do this for you.
If you system displays a message for each service being shutdown
during a shutdown you should be able to watch and see if postgres
is shutdown as part of that process.




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

* Re: Automatic shutdown from Linux.
  2003-05-09 12:25 Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
  2003-05-09 12:56 ` Re: Automatic shutdown from Linux. Bruno Wolff III <bruno@wolff.to>
@ 2003-05-09 13:00   ` dlangschied <dlangschied@ameritech.net>
  1 sibling, 0 replies; 5+ messages in thread

From: dlangschied @ 2003-05-09 13:00 UTC (permalink / raw)
  To: Bruno Wolff III <bruno@wolff.to>; +Cc: pgsql-admin

Thanx!
I didn't think of that, but I did notice in the log file that a smart
shutdown had been performed.

Sincerely,

David Langschied
Langschied Consulting Services
25644 Mackinac
Roseville, MI 48066

Phone:  (586)777-7542
Cell:      (248)789-8493
e-mail:  dlangschied@ameritech.net
----- Original Message ----- 
From: "Bruno Wolff III" <bruno@wolff.to>
To: "dlangschied" <dlangschied@Ameritech.Net>
Cc: <pgsql-admin@postgresql.org>
Sent: Friday, May 09, 2003 8:56 AM
Subject: Re: [ADMIN] Automatic shutdown from Linux.


> On Fri, May 09, 2003 at 08:25:53 -0400,
>   dlangschied <dlangschied@ameritech.net> wrote:
> > Hi all!
> > I would like to automate the shutdown of my postgres database, just as I
do
> > with my startup.  I have looked through the docs and I can't find
anything
> > that addresses this issue.  I am sure that there are many out there who
> > don't manually shutdwon the database prior to a system shutdown/reboot.
> > Please advise.
> > Sincerely,
>
> Probably the init scripts for your system already do this for you.
> If you system displays a message for each service being shutdown
> during a shutdown you should be able to watch and see if postgres
> is shutdown as part of that process.
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html




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

* Re: Automatic shutdown from Linux.
  2003-05-09 12:25 Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
  2003-05-09 12:56 ` Re: Automatic shutdown from Linux. Bruno Wolff III <bruno@wolff.to>
@ 2003-05-09 13:04   ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2003-05-09 13:04 UTC (permalink / raw)
  To: Bruno Wolff III <bruno@wolff.to>; +Cc: dlangschied <dlangschied@ameritech.net>; pgsql-admin

Bruno Wolff III <bruno@wolff.to> writes:
> Probably the init scripts for your system already do this for you.
> If you system displays a message for each service being shutdown
> during a shutdown you should be able to watch and see if postgres
> is shutdown as part of that process.

Also, in a conventionally-run Unix system the database will shut down
cleanly even without any init-script help.  This is because the
postmaster and backends are designed (with malice aforethought ;-))
to interpret SIGTERM as a fast-shutdown request.  Assuming that the
kernel gives user processes a reasonable number of seconds between
SIGTERM and SIGKILL --- enough for a checkpoint --- you don't really
need anything else.

One reason not to crank shared_buffers up to the moon is that with a
huge number of dirty buffers, checkpoint might take too long for this
scenario to be robust.  On my HPUX box, the kernel will give twenty
seconds' grace between SIGTERM and SIGKILL, which is enough for even
a pretty messy checkpoint, but I dunno what the equivalent delay is
on other platforms.

			regards, tom lane




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

* Re: Automatic shutdown from Linux.
  2003-05-09 12:25 Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
@ 2003-05-09 13:21 ` David W Noon <dwnoon@spamtrap.ntlworld.com>
  1 sibling, 0 replies; 5+ messages in thread

From: David W Noon @ 2003-05-09 13:21 UTC (permalink / raw)
  To: pgsql-admin

On Friday 09 May 2003 13:26 in <002601c31626$229da170$6401a8c0@lcshost>,
dlangschied (dlangschied@ameritech.net) wrote:

> I would like to automate the shutdown of my postgres database, just as I
> do with my startup.

I wrote a start-up and shutdown script to be placed in /etc/init.d and
symlinked into /etc/init.d/rc?.d, where "?" is your init run-level. There
is also a small configuration script to be placed in /etc/sysconfig. You,
or anybody else, may have a copy of them. These have been tested on SuSE
8.1 Pro, but should work on most other LINUX distros too.

[If you are running W******, just ignore this follow-up.]

-- 
Regards,

Dave
======================================================
dwnoon@spamtrap.ntlworld.com (David W Noon)
Remove spam trap to reply via e-mail.
======================================================




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


end of thread, other threads:[~2003-05-09 13:21 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-05-09 12:25 Automatic shutdown from Linux. dlangschied <dlangschied@ameritech.net>
2003-05-09 12:56 ` Bruno Wolff III <bruno@wolff.to>
2003-05-09 13:00   ` dlangschied <dlangschied@ameritech.net>
2003-05-09 13:04   ` Tom Lane <tgl@sss.pgh.pa.us>
2003-05-09 13:21 ` David W Noon <dwnoon@spamtrap.ntlworld.com>

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