Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 0DAF82E033E for ; Wed, 16 Jan 2008 08:01:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 59709-08 for ; Wed, 16 Jan 2008 08:00:55 -0400 (AST) Received: from smtp.l00-bugdead-prods.de (48.53.204.212.ediscom.de [212.204.53.48]) by postgresql.org (Postfix) with ESMTP id DADA42E0330 for ; Wed, 16 Jan 2008 08:01:01 -0400 (AST) Received: by smtp.l00-bugdead-prods.de (Postfix, from userid 1001) id 67F533AEC3; Wed, 16 Jan 2008 13:00:59 +0100 (CET) organization: L00 bugdead prods. X-Mailer: OpenGroupware.org MIME-Version: 1.0 from: "Sebastian Reitenbach" Subject: Re: trigger run of archive_command? to: pgsql-admin@postgresql.org reply-to: "Sebastian Reitenbach" content-type: text/plain; charset="us-ascii" date: Wed, 16 Jan 2008 13:00:58 +0100 content-transfer-encoding: 7bit Message-Id: <20080116120059.67F533AEC3@smtp.l00-bugdead-prods.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/181 X-Sequence-Number: 27955 Hi, Andreas 'ads' Scherbaum wrote: > > Hello, > > On Mon, 14 Jan 2008 17:39:34 +0100 Sebastian Reitenbach wrote: > > > Thomas Karcher 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