Skip site navigation (1) Skip section navigation (2)

Re: on-line backup questions

From: Tom Davies <tgdavies(at)gmail(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: on-line backup questions
Date: 2007-12-22 05:20:26
Message-ID: 76654B35-D2A4-4167-81A0-F748E0263348@gmail.com (view raw or flat)
Thread:
Lists: pgsql-admin
Thanks for the prompt response!

On 22/12/2007, at 1:33 PM, Tom Lane wrote:

> Tom Davies <tgdavies(at)gmail(dot)com> writes:
>>
>> 3. What's the best thing to do when I deliberately shut down
>> PostgreSQL (i.e. pg_ctl stop)? When I start again I will be restoring
>> from the most recent backup and rolling forward over the archived WAL
>> files. I believe that shutdown leaves me with unarchived WAL files in
>> pg_xlog.
>
> Yeah, you should archive the latest WAL file, but in 8.0 you'd have to
> do that manually.  (IIRC there isn't even a forced-xlog-switch  
> function
> in that version to help you.)

So in 8.2, when I do a backup I *don't* need to manually copy any WAL  
files?, and when I shut down I should:

1 call pg_switch_xlog()
2 wait for the WAL to be archived *if* pg_switch_xlog return a  
location after the end of the previously archived WAL
3 actually call pg_ctl stop

Do I need to do 2, above, or can postgres wait until the previous WAL  
archive is complete?

Thanks,
   Tom

In response to

pgsql-admin by date

Next:From: AlkinossDate: 2007-12-22 11:13:52
Subject: [TLM] Trojan in distribution 8.2.5
Previous:From: Tom LaneDate: 2007-12-22 02:33:50
Subject: Re: on-line backup questions

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group