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

Re: trigger run of archive_command?

From: "Sebastian Reitenbach" <sebastia(at)l00-bugdead-prods(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: trigger run of archive_command?
Date: 2008-01-16 12:00:58
Message-ID: 20080116120059.67F533AEC3@smtp.l00-bugdead-prods.de (view raw or flat)
Thread:
Lists: pgsql-admin
Hi,
Andreas 'ads' Scherbaum <adsmail(at)wars-nicht(dot)de> wrote: 
> 
> Hello,
> 
> On Mon, 14 Jan 2008 17:39:34 +0100 Sebastian Reitenbach wrote:
> 
> > Thomas Karcher <thkarcher(at)gmx(dot)de> wrote: 
> > > 
> > > > this one is still open when I run pg_stop_backup(), so I want to 
trigger 
> > > > the archive_command to be sure that I don't miss anything. 
> > > 
> > > I guess what you want is pg_switch_xlog() (see
> > > http://www.postgresql.org/docs/8.2/static/functions-admin.html)
> > this is exactly what I am looking for
> > > which became available with PG 8.2 ...
> > unfortunately right now I am stuck to PG 8.1.4.
> > I hope I can manage to upgrade without too much hassle, it seems 
meanwhile I 
> > have to use my workaround.
> 
> a very rude hack is to produce enough changes so that PG will rotate
> the logfile anyway:
> 
> CHECKPOINT;
> CREATE TABLE xlog_switch AS SELECT
> '0123456789ABCDE'::VARCHAR FROM generate_series(1,300000);
> DROP TABLE xlog_switch;
> 
> This is a lot of overhead, but it does the job.
until we upgrade, we do it in a very similar way.

thanks
Sebastian



pgsql-admin by date

Next:From: Joshua D. DrakeDate: 2008-01-16 14:59:41
Subject: Re: Backup of live database
Previous:From: Steve HoldowayDate: 2008-01-16 10:30:30
Subject: Re: Backup of live database

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