From: | Andreas Schmitz <mailinglist(at)longimanus(dot)net> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: pg_ctl stop failure |
Date: | 2013-05-18 09:15:38 |
Message-ID: | 519746BA.4070708@longimanus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
It is not necessary to shutdown the database to take a filesystem level
backup. you might consider to use
pg_start_backup()
cp ...
pg_stop_backup()
Take a look at the documentation for further details
http://www.postgresql.org/docs/8.4/static/functions-admin.html
regards
Andreas
On 05/17/2013 05:00 PM, Amit Langote wrote:
> On Fri, May 17, 2013 at 10:47 PM, Birchall, Austen
> <austen(dot)birchall(at)metoffice(dot)gov(dot)uk> wrote:
>> 8.4.13 & PostGIS 2.0 on Red Hat 6
>>
>> I want to do a offline backup of /var/lib/pgsql/data
>>
>> But whenever I do
>>
>> Pg_ctl stop
>>
>> I get
>>
>> -bash-4.1$ pg_ctl stop
>> waiting for server to shut down............................................................... failed
>> pg_ctl: server does not shut down
>>
> This means you have clients connected to the database and server won't
> shut down until all the clients have disconnected.
>
>> 1. If I do
>>
>> pg_ctl stop -m f
>>
>> the cluster and databases shutdown as required but is this a clean and/or consistent shutdown of the cluster in the sense that I could recover from the OS
>>
> "-m f " mode disconnects those clients for you. pg_ctl Documentation
> at http://www.postgresql.org/docs/8.4/static/app-pg-ctl.html
> says:
> "Fast" mode does not wait for clients to disconnect and will terminate
> an online backup in progress. All active transactions are rolled back
> and clients are forcibly disconnected, then the server is shut down.
>
> So what you have is a consistent shut down with incomplete
> transactions rolled back. By the way, could you see any active
> connections while you tried stopping the server?
>
> --
> Amit Langote
>
>
From | Date | Subject | |
---|---|---|---|
Next Message | changhh | 2013-05-20 03:51:43 | log error"No connection could be made because the target machine actively refused it." |
Previous Message | Amit Langote | 2013-05-17 15:37:22 | Re: pg_ctl stop failure |