Unix Technical Forum

trigger run of archive_command?

This is a discussion on trigger run of archive_command? within the pgsql Admins forums, part of the PostgreSQL category; --> Hi, I want to do online backup saving the WAL files. So I set the database into backup mode, ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 09:18 AM
Sebastian Reitenbach
 
Posts: n/a
Default trigger run of archive_command?

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


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 09:18 AM
Thomas Karcher
 
Posts: n/a
Default Re: trigger run of archive_command?

Hi,

> 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/s...ons-admin.html)
which became available with PG 8.2 ...


Thomas


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBHi4uGiMyIQtYO79wRAohRAJ46c8/MnGzdCofuiEy806iWL/be5QCfTpST
ISPtB6J5SW36wQPcsXV/txc=
=cMTR
-----END PGP SIGNATURE-----

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 05:29 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com