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

trigger run of archive_command?

From: "Sebastian Reitenbach" <sebastia(at)l00-bugdead-prods(dot)de>
To: pgsql-admin(at)postgresql(dot)org
Subject: trigger run of archive_command?
Date: 2008-01-14 16:10:20
Message-ID: 20080114161020.A83E23A672@smtp.l00-bugdead-prods.de (view raw or flat)
Thread:
Lists: pgsql-admin
Hi,

I want to do online backup saving the WAL files. So I set the database into 
backup mode, make a backup, and then set the datbase to normal mode with 
pg_stop_backup(). 
To make the backup complete, I need to backup the actual WAL file too, but 
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. 
In postgresql.conf I have defined an archive_command in postgresql.conf to 
tell postgres what to do when the WAL file reaches a maximum filesize. 

I use postgresql 8.1.4, so I only can make the archive_command depend on the 
size of the WAL files, right now the maximum size of a WAL file is defined 
to 16mb.
As a workaround I could create a dummy table, insert 16MB to make sure the 
WAL files get rotated, and then I can backup the last WAL file.

But my hope is that there is an easier way, e.g. do I can use a trigger to 
force the archive_command or any other mechanism?

kind regards
Sebastian


Responses

pgsql-admin by date

Next:From: Peter KoczanDate: 2008-01-14 16:13:03
Subject: monitoring free space map usage without VACUUM
Previous:From: Marc MaminDate: 2008-01-14 08:57:27
Subject: Re: SQL stored function inserting and returning data in a row.

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