Re: AW: Shutdown term

From: Thomas Swan <tswan-lst(at)ics(dot)olemiss(dot)edu>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter_e(at)gmx(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: AW: Shutdown term
Date: 2001-03-14 16:44:00
Message-ID: 5.0.2.1.0.20010314102032.00ad4b38@tangent.ics.olemiss.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


>OK, I phoned Tom and we agreed on this wording:
>
> This connection has been terminated by the administrator
>
>Comments?

This connection has been terminated by an administrator
(there may be more than one...) :)

Other than that it's informative enough.

OTOH, I had a small thought on this.

If you had a messaging scheme to print to clients when a signal was
received, is there the possibility of more informative messages perhaps
that could be sent by the pg_ctl program through the postmaster (or
backends) on shutdowns? This would allow for some decent scripting. For
example, the database is shutdown without the system going down or the
whole system is going down for maintenance or scheduled reboot.

It may seem stupid but I was thinking the reason could be an argument to
the pg_ctl program with a default of (Database Shutdown).

pg_ctl stop --message="System going down for a reboot"
or
pg_ctl stop -msg "System upgrade. System will be available again at 5:00am"

The client would receive
The connection has been terminated
[System Shutdown|Database Shutdown|Unknown Reason|"some string as an argument"]

Also, it allows for more informative messages.
Scheduled downtime (System will be online again at {whenever})
Idle Timeout
You are using too much CPU...
You are using too little CPU...

These message can be set by the scripts for "run level" changes and the like.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim Mercer 2001-03-14 17:00:38 Re: Re: Week number
Previous Message Bruce Momjian 2001-03-14 16:34:54 pgmonitor patch for query string