Thread: Shutting down postgresql
What is the proper way to shutdown the postgresql server (7.1.3) on a linux system?
Thank you!
Troy Campano
On Fri, Dec 28, 2001 at 10:00:00AM -0500, "Campano, Troy" <Troy.Campano@LibertyMutual.com> wrote: > What is the proper way to shutdown the postgresql server (7.1.3) on a linux > system? I usually use "/etc/rc.d/init.d/postgresql stop".
Did you install from source or RPM? I installed from source. What does that script actually do when you pass it the stop parameter? -----Original Message----- From: Bruno Wolff III [mailto:bruno@[66.92.219.49]] Sent: Friday, December 28, 2001 10:44 AM To: Campano, Troy Cc: Pgsql-General (pgsql-general@postgresql.org) Subject: Re: [GENERAL] Shutting down postgresql On Fri, Dec 28, 2001 at 10:00:00AM -0500, "Campano, Troy" <Troy.Campano@LibertyMutual.com> wrote: > What is the proper way to shutdown the postgresql server (7.1.3) on a > linux system? I usually use "/etc/rc.d/init.d/postgresql stop".
Troy, Something that caught me up at first is that PostgreSQL won't shut down until all it's backends close, which means that if you have an application connected that uses pooled or cached connections you will probably have to shut it down first. Peter Darley -----Original Message----- From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org]On Behalf Of Bruno Wolff III Sent: Friday, December 28, 2001 7:44 AM To: Campano, Troy Cc: Pgsql-General (pgsql-general@postgresql.org) Subject: Re: [GENERAL] Shutting down postgresql On Fri, Dec 28, 2001 at 10:00:00AM -0500, "Campano, Troy" <Troy.Campano@LibertyMutual.com> wrote: > What is the proper way to shutdown the postgresql server (7.1.3) on a linux > system? I usually use "/etc/rc.d/init.d/postgresql stop". ---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to majordomo@postgresql.org so that your message can get through to the mailing list cleanly
"Peter Darley" <pdarley@Kinesis-CEM.com> writes: > Something that caught me up at first is that PostgreSQL won't shut down > until all it's backends close, which means that if you have an application > connected that uses pooled or cached connections you will probably have to > shut it down first. This depends on how the postmaster is commanded to shut down. I think what Troy is looking for is the various stop-mode options to pg_ctl: http://developer.postgresql.org/docs/postgres/app-pg-ctl.html or perhaps he wants to know about the underlying signals that can be sent to the postmaster: http://developer.postgresql.org/docs/postgres/postmaster-shutdown.html regards, tom lane
On Fri, Dec 28, 2001 at 10:44:46AM -0500, Troy.Campano@LibertyMutual.com wrote: > Did you install from source or RPM? > I installed from source. I installed from source, but used a modified version of redhat's init script from a binary install. > > What does that script actually do when you pass it the stop parameter? I have attached it.
Attachment
That's what I was looking for. Thank you! -----Original Message----- From: Tom Lane [mailto:tgl@sss.pgh.pa.us] Sent: Friday, December 28, 2001 11:43 AM To: Peter Darley Cc: Campano, Troy; pgsql-general@postgresql.org Subject: Re: [GENERAL] Shutting down postgresql "Peter Darley" <pdarley@Kinesis-CEM.com> writes: > Something that caught me up at first is that PostgreSQL won't shut > down until all it's backends close, which means that if you have an > application connected that uses pooled or cached connections you will > probably have to shut it down first. This depends on how the postmaster is commanded to shut down. I think what Troy is looking for is the various stop-mode options to pg_ctl: http://developer.postgresql.org/docs/postgres/app-pg-ctl.html or perhaps he wants to know about the underlying signals that can be sent to the postmaster: http://developer.postgresql.org/docs/postgres/postmaster-shutdown.html regards, tom lane
On Vie 28 Dic 2001 13:16, Peter Darley wrote: > Troy, > Something that caught me up at first is that PostgreSQL won't shut down > until all it's backends close, which means that if you have an application > connected that uses pooled or cached connections you will probably have to > shut it down first. pg_ctl stop -m immediate Saludos... :-) -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------
On Vie 28 Dic 2001 12:43, Bruno Wolff III wrote: > On Fri, Dec 28, 2001 at 10:00:00AM -0500, > > "Campano, Troy" <Troy.Campano@LibertyMutual.com> wrote: > > What is the proper way to shutdown the postgresql server (7.1.3) on a > > linux system? > > I usually use "/etc/rc.d/init.d/postgresql stop". That would be on a RH <= 6.x. The correct thing should be /etc/init.d/postgresql stop, not only on Linux, but on any UNIX system (my case is Solaris 8). My 2 cents -- Porqué usar una base de datos relacional cualquiera, si podés usar PostgreSQL? ----------------------------------------------------------------- Martín Marqués | mmarques@unl.edu.ar Programador, Administrador, DBA | Centro de Telematica Universidad Nacional del Litoral -----------------------------------------------------------------