Обсуждение: Switch off PITR

Поиск
Список
Период
Сортировка

Switch off PITR

От
"Joey K."
Дата:
Hello all,

I have been doing PITR backups for a while to a backup server via NFS. It's working great.

I have to shutdown the backup server for hardware/OS upgrade. I expect this upgrade will last a week.

How do I turn off PITR in the mean time? I commented archive_command and issued a pg_ctl reload and postgres is *still* archiving logs to the backup server.

I'm running 8.1.5 and scheduled for upgrade to latest 8.1.x once the backup server is upgraded.

Thanks in advance,
Joey 

Re: Switch off PITR

От
Bill Moran
Дата:
In response to "Joey K." <pguser@gmail.com>:
>
> How do I turn off PITR in the mean time? I commented archive_command and
> issued a pg_ctl reload and postgres is *still* archiving logs to the backup
> server.

Pretty sure you're going to need a full restart -- reload won't cause
that parameter to be re-evaluated.

--
Bill Moran
Collaborative Fusion Inc.
http://people.collaborativefusion.com/~wmoran/

wmoran@collaborativefusion.com
Phone: 412-422-3463x4023

****************************************************************
IMPORTANT: This message contains confidential information and is
intended only for the individual named. If the reader of this
message is not an intended recipient (or the individual
responsible for the delivery of this message to an intended
recipient), please be advised that any re-use, dissemination,
distribution or copying of this message is prohibited. Please
notify the sender immediately by e-mail if you have received
this e-mail by mistake and delete this e-mail from your system.
E-mail transmission cannot be guaranteed to be secure or
error-free as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The
sender therefore does not accept liability for any errors or
omissions in the contents of this message, which arise as a
result of e-mail transmission.
****************************************************************

Re: Switch off PITR

От
"Joshua D. Drake"
Дата:
On Wed, 2008-12-03 at 13:16 -0500, Bill Moran wrote:
> In response to "Joey K." <pguser@gmail.com>:
> >
> > How do I turn off PITR in the mean time? I commented archive_command and
> > issued a pg_ctl reload and postgres is *still* archiving logs to the backup
> > server.
>
> Pretty sure you're going to need a full restart -- reload won't cause
> that parameter to be re-evaluated.

You can change archive_command to something like /bin/true and reload.
However you will have to do a full base backup to get postgresql doing
log shipping again.

Joshua D. Drake

--
PostgreSQL
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


Re: Switch off PITR

От
"Fujii Masao"
Дата:
On Thu, Dec 4, 2008 at 3:00 AM, Joey K. <pguser@gmail.com> wrote:
> Hello all,
>
> I have been doing PITR backups for a while to a backup server via NFS. It's
> working great.
>
> I have to shutdown the backup server for hardware/OS upgrade. I expect this
> upgrade will last a week.
>
> How do I turn off PITR in the mean time? I commented archive_command and
> issued a pg_ctl reload and postgres is *still* archiving logs to the backup
> server.

Unfortunately there is delay in the archiver actually reloading the
configuration
change. If there are 10 .ready files in pg_xlog/archive_status, you might have
to wait for the reloading until the archiver finish archiving 10 WAL files.

Regards,

--
Fujii Masao
NIPPON TELEGRAPH AND TELEPHONE CORPORATION
NTT Open Source Software Center

Re: Switch off PITR

От
Robert Treat
Дата:
On Wednesday 03 December 2008 14:22:28 Joshua D. Drake wrote:
> On Wed, 2008-12-03 at 13:16 -0500, Bill Moran wrote:
> > In response to "Joey K." <pguser@gmail.com>:
> > > How do I turn off PITR in the mean time? I commented archive_command
> > > and issued a pg_ctl reload and postgres is *still* archiving logs to
> > > the backup server.
> >
> > Pretty sure you're going to need a full restart -- reload won't cause
> > that parameter to be re-evaluated.
>
> You can change archive_command to something like /bin/true and reload.
> However you will have to do a full base backup to get postgresql doing
> log shipping again.
>

You can probably avoid this by having your archive command put the xlogs
somewhere local, and then once you restart setting up the archive command to
push back to your backup and then moving the missing logs manually.  (This is
more/less fragile depending on exactly how you've set things up, but should
be doable)

--
Robert Treat
Conjecture: http://www.xzilla.net
Consulting: http://www.omniti.com