Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 996B82E090E for ; Wed, 16 Jan 2008 06:21:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 12862-03 for ; Wed, 16 Jan 2008 06:21:50 -0400 (AST) Received: from base.wars-nicht.de (wars-nicht.de [213.239.199.195]) by postgresql.org (Postfix) with ESMTP id 2C8672E0391 for ; Wed, 16 Jan 2008 06:21:54 -0400 (AST) Received: from iridium.wars-nicht.de (Qfe13.q.pppool.de [89.53.254.19]) by base.wars-nicht.de (Postfix) with ESMTP id 00D52784179; Wed, 16 Jan 2008 11:21:51 +0100 (CET) Received: from iridium.home (iridium.wars-nicht.de [127.0.0.1]) by iridium.wars-nicht.de (Postfix) with ESMTP id 9FB313DD7BE; Wed, 16 Jan 2008 11:21:54 +0100 (CET) Date: Wed, 16 Jan 2008 11:21:54 +0100 From: Andreas 'ads' Scherbaum To: pgsql-admin@postgresql.org Cc: "Sebastian Reitenbach" Subject: Re: trigger run of archive_command? Message-ID: <20080116112154.574b242d@iridium.home> In-Reply-To: <20080114163934.EB8D83A6F7@smtp.l00-bugdead-prods.de> References: <20080114163934.EB8D83A6F7@smtp.l00-bugdead-prods.de> X-Mailer: Claws Mail 2.10.0 (GTK+ 2.12.0; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/179 X-Sequence-Number: 27953 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. Kind regards -- Andreas 'ads' Scherbaum German PostgreSQL User Group