Database not restarting

Поиск
Список
Период
Сортировка
От Stefan Berg
Тема Database not restarting
Дата
Msg-id web-67296096@mail01.infosat.net
обсуждение исходный текст
Ответы Re: Database not restarting  (Robert Treat <xzilla@users.sourceforge.net>)
Список pgsql-admin
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


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Anagha Joshi"
Дата:
Сообщение:
Следующее
От: "Dennis Oudijk"
Дата:
Сообщение: Monitoring server loads