Thread: Shutting down pgsql

Shutting down pgsql

From
Mark Warner
Date:
Greetings,

    Is it possible, advisable, or terribly bad to shutdown a pgsql
database with the do.maintenance script running? I have a 12gb db with
about 780 tables that has been running maintenance now for approximately
67 hours, and it is beginning to seriously degrade the performance of
the application that drives. I am running on debian linux testing, with
pgsql 7.3.4.

    So I am wondering if it is possible and advisable to either kill the
task, or shut down the database in order to do some work on it.

Thanks,
Mark Warner.


Re: Shutting down pgsql

From
Tom Lane
Date:
Mark Warner <hammerhed@theitspecialists.net> writes:
>     Is it possible, advisable, or terribly bad to shutdown a pgsql
> database with the do.maintenance script running?

You didn't say exactly what that script is doing ... but in general
PG queries can be shut down safely.  What I'd do is kill the client
program running the script and then send SIGINT to the backend it's
connected to.  Shutting down the whole database is the hard way.

            regards, tom lane