pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stefan Berg <svb1@ananzi.co.za>
To: pgsql-sql@postgresql.org
Subject: Database not restarting
Date: Wed, 26 Mar 2003 14:18:13 +0200
Message-ID: <redirect-67329425@mail01.infosat.net> (raw)

Hi list,

Having a problem shutting down
a database (ver 7.3.1)

I basically restart a certain database every night
because it always used to be the easy solution,
to get rid of unwanted zombie connections,
left by people who close front end aps by
switching off their computers.

The problem now is, that with one big database,
these type of runnaway processes actually keeps
the database from shutting down.

I initiate all this by killing the postmaster
(kill -15), I then get these nice logs :

2003-03-23 17:30:01 LOG:  smart shutdown request
2003-03-23 17:30:01 LOG:  shutting down
2003-03-23 17:30:02 LOG:  connection received: host=bubba
port=3400000
2003-03-23 17:30:02 FATAL:  The database system is shutting
down
2003-03-23 17:30:04 LOG:  recycled transaction log file
00000052000000A0
2003-03-23 17:30:04 LOG:  recycled transaction log file
00000052000000A1
2003-03-23 17:30:04 LOG:  recycled transaction log file
00000052000000A2
2003-03-23 17:30:04 LOG:  removing transaction log file
00000052000000A3
2003-03-23 17:30:04 LOG:  removing transaction log file
00000052000000A4
2003-03-23 17:30:04 LOG:  removing transaction log file
00000052000000A5
2003-03-23 17:30:04 LOG:  removing transaction log file
00000052000000A6
2003-03-23 17:30:04 LOG:  database system is shut down
2003-03-25 18:01:14 LOG:  database system was shut down at
2003-03-25 18:00:54 SAST

OK, the fictional host trying to connect, is a script
I wrote to check if the database has been shut down or not.
You can see my problem between 17:30:04 and 18:01:14

This was caused by some stray idle connection that I
just killed (-15), and then the database finally shut down.

My current script attempt to kill this kind of stray
process,
is making me scared. Now my question:

Can anyone give some advise on an elegant way to shut down
the database properly. In my case, I don't worry or care
if someone was still busy on the database, because nobody
updates stuff.

Any help will be appreciated.

Stef 
 
==
Download ringtones, logos and picture messages at Ananzi Mobile Fun.
http://www.ananzi.co.za/cgi-bin/goto.pl?mobile




view thread (2+ messages)  latest in thread

Message-ID: <redirect-67329425@mail01.infosat.net>
Permalink:  ../redirect-67329425@mail01.infosat.net/
Also on:    postgresql.org/message-id/redirect-67329425@mail01.infosat.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: svb1@ananzi.co.za
  Subject: Re: Database not restarting
  In-Reply-To: <redirect-67329425@mail01.infosat.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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