pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas 'ads' Scherbaum <adsmail@wars-nicht.de>
To: pgsql-admin@postgresql.org
Cc: Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
Subject: Re: trigger run of archive_command?
Date: Wed, 16 Jan 2008 11:21:54 +0100
Message-ID: <20080116112154.574b242d@iridium.home> (raw)
In-Reply-To: <20080114163934.EB8D83A6F7@smtp.l00-bugdead-prods.de>
References: <20080114163934.EB8D83A6F7@smtp.l00-bugdead-prods.de>


Hello,

On Mon, 14 Jan 2008 17:39:34 +0100 Sebastian Reitenbach wrote:

> Thomas Karcher <thkarcher@gmx.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.


Kind regards

-- 
				Andreas 'ads' Scherbaum
German PostgreSQL User Group



view thread (5+ messages)  latest in thread

Message-ID: <20080116112154.574b242d@iridium.home>
Permalink:  ../20080116112154.574b242d@iridium.home/
Also on:    postgresql.org/message-id/20080116112154.574b242d@iridium.home

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: adsmail@wars-nicht.de, sebastia@l00-bugdead-prods.de
  Subject: Re: trigger run of archive_command?
  In-Reply-To: <20080116112154.574b242d@iridium.home>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox