Re: [ADMIN] archive_command and streaming replication

2012-03-12 Thread MirrorX
i dont quite understand the question. could you pls clarify a little? you want to save the pg_xlog-files from where? the master of the slave? the tool you are looking for, if it exists, should do what? thx On Sun, Mar 11, 2012 at 11:05 PM, Martin von Oertzen [via PostgreSQL] < ml-node+s1045698n5

[ADMIN] archive_command and streaming replication

2012-03-11 Thread Martin von Oertzen
PostgreSQL 9.1.2 to keep the cpu- and io-load low, we use streaming replication with only one slave. http://wiki.postgresql.org/wiki/Binary_Replication_Tutorial#Streaming_Replication the slave is not using the "archive_command" while in recovering mode. is there any tool to save the pg_xlog-files

Re: [ADMIN] archive_command vs. cp -i

2011-06-17 Thread Tom Lane
I wrote: > John Rouillard writes: >> I get the same result (0 exit status) on solaris 8 and solaris 10 with >> /bin/cp. I wonder what platform the example worked on. > cp does behave as the example suggests for me, on OS X and HPUX. I > suspect Bruce tested it on some BSD variant before putting

Re: [ADMIN] archive_command vs. cp -i

2011-06-17 Thread Tom Lane
John Rouillard writes: >> On Fri, Jun 17, 2011 at 12:32 PM, Kevin Grittner >> kevin.gritt...@wicourts.gov> wrote: This could be reproduced on CentOS 5.6, RHEL4, and Ubuntu 10.04. >>> I've confirmed on SLES 10 and Ubuntu 9, too. > Not really surprising since choosing to not copy a file isn't

Re: [ADMIN] archive_command vs. cp -i

2011-06-17 Thread John Rouillard
Hi all: Corrected the top posting. On Fri, Jun 17, 2011 at 12:55:07PM -0400, Tim wrote: > On Fri, Jun 17, 2011 at 12:32 PM, Kevin Grittner > kevin.gritt...@wicourts.gov> wrote: > > "Martin Münstermann" wrote: > > > while setting up a new linux postgresql server, I checked my > > > archive_command

Re: [ADMIN] archive_command vs. cp -i

2011-06-17 Thread Tim
Technically the documentation covers its self by saying: "This is an example, not a recommendation, and might not work on all platforms." What would be nice is if the documentation could be made more useful by providing some more complex example scripts. What do our readers use for WAL archiving?

Re: [ADMIN] archive_command vs. cp -i

2011-06-17 Thread Kevin Grittner
"Martin Münstermann" wrote: > while setting up a new linux postgresql server, I checked my > archive_command. I noticed that the usual "cp -i f1 f2 < > /dev/null" did NOT as expected: It did not overwrite the file > (PASS), but it returned zero (FAIL, should return error). > > This could be r

[ADMIN] archive_command vs. cp -i

2011-06-17 Thread Martin Münstermann
Hi, while setting up a new linux postgresql server, I checked my archive_command. I noticed that the usual "cp -i f1 f2 < /dev/null" did NOT as expected: It did not overwrite the file (PASS), but it returned zero (FAIL, should return error). This could be reproduced on CentOS 5.6, RHEL4, and Ub

Re: [ADMIN] archive_command

2009-09-01 Thread Abbas
On Tue, Sep 1, 2009 at 4:47 PM, samana srikanth wrote: > can i change the "archive_command" from the postgres sql prompt ot sql > command? > Thanks > Srikanth > Nope, You can't change archive_command from psql prompt. Abbas

[ADMIN] archive_command

2009-09-01 Thread samana srikanth
can i change the "archive_command" from the postgres sql prompt ot sql command? Thanks Srikanth

Re: [ADMIN] archive_command does not execute

2007-06-19 Thread Simon Riggs
On Tue, 2007-06-19 at 08:17 -0400, George Wilk wrote: > archive_command = 'touch /var/lib/pgsql/bkp/myfile' Presumably you understand that an archive_command like the above is not ever going to do any archiving? set log_min_messages = DEBUG1 if you want to see the archive messages. B

Re: [ADMIN] archive_command does not execute

2007-06-19 Thread Kevin Grittner
>>> On Tue, Jun 19, 2007 at 11:16 AM, in message <[EMAIL PROTECTED]>, Tom Arthurs <[EMAIL PROTECTED]> wrote: > > Looks like you are expecting the archive command to run when you shut > down the data base. It won't. It only runs when the xlog gets full and > the system needs to recycle to a new

Re: [ADMIN] archive_command does not execute

2007-06-19 Thread Tom Arthurs
George Wilk wrote: Hi, I am attempting to use the WAL archiving on a Solaris machine, running PostgreSQL 8.1.4. The archive_command specified in the postgresql.conf file does not get executed, nor do I see any log entries showing errors etc. What am I doing wrong here? Here is the

[ADMIN] archive_command does not execute

2007-06-19 Thread George Wilk
Hi, I am attempting to use the WAL archiving on a Solaris machine, running PostgreSQL 8.1.4. The archive_command specified in the postgresql.conf file does not get executed, nor do I see any log entries showing errors etc. What am I doing wrong here? Here is the relevant fragment of my c

Re: [ADMIN] archive_command

2005-10-15 Thread Jeff Frost
Looks like using that FILE= expression, I ended up with a bad file choice last night immediately after the base backup: Copying 0001001500F8.0088A490.backup to /mnt/pgbackup/pitr/0001001500F8.0088A490.backup Also, I noticed that rsync had a file disappear out from under

Re: [ADMIN] archive_command

2005-10-05 Thread Jeff Frost
On Tue, 4 Oct 2005, Gaetano Mendola wrote: Looks like we're doing just about the same thing, but you're using head and I'm using tail. However, it seems that your method does not require grepping out the special files, so that's awesome! BTW you do not have to use the -1 flag when you put ls

Re: [ADMIN] archive_command

2005-10-04 Thread Jeff Frost
On Tue, 4 Oct 2005, Simon Riggs wrote: What would constitute an intermediate rebuild? Of course the system is up and live and having data added to it. How would one restore from multiple timelines? This is only if you are back up and working on the went-down box: intermediate rebuild: I mea

Re: [ADMIN] archive_command

2005-10-04 Thread Simon Riggs
On Tue, 2005-10-04 at 08:03 -0700, Jeff Frost wrote: > >> Is there any possible way to replay the other WAL files after the Sep 21 > >> switchover/switchback? I'm going to guess this is similar to having > >> another > >> timeline. > > > > That may be your exact case, it depends upon how you did

Re: [ADMIN] archive_command

2005-10-04 Thread Gaetano Mendola
Jeff Frost wrote: > On Sun, 2 Oct 2005, Simon Riggs wrote: > >> Probably the best idea is to backup the last WAL file for each timeline >> seen. Keep track of that, so when the current file changes you'll know >> which timeline you're on and stick to that from then on. Or more simply, >> put some

Re: [ADMIN] archive_command

2005-10-04 Thread Jeff Frost
On Tue, 4 Oct 2005, Simon Riggs wrote: Now here's the problem...the servers switched roles on Sep 21. We switched them back a little while after that. When I went to replay the WAL files using the Sep 15 base backup, it happily played back the WAL files to Sep 21 and stopped. I presume that th

Re: [ADMIN] archive_command

2005-10-04 Thread Simon Riggs
On Mon, 2005-10-03 at 20:00 -0700, Jeff Frost wrote: > On Sun, 2 Oct 2005, Simon Riggs wrote: > > > Probably the best idea is to backup the last WAL file for each timeline > > seen. Keep track of that, so when the current file changes you'll know > > which timeline you're on and stick to that from

Re: [ADMIN] archive_command

2005-10-03 Thread Jeff Frost
On Sun, 2 Oct 2005, Simon Riggs wrote: Probably the best idea is to backup the last WAL file for each timeline seen. Keep track of that, so when the current file changes you'll know which timeline you're on and stick to that from then on. Or more simply, put some notes with your program saying "

Re: [ADMIN] archive_command

2005-10-02 Thread Simon Riggs
On Sat, 2005-10-01 at 21:43 -0700, Jeff Frost wrote: > On Fri, 30 Sep 2005, Simon Riggs wrote: > > > If I follow your example, yes. But that assumes there is only one > > timeline's WAL files in your pg_xlog. It could get more complex in that > > situation because you could be in any of the timeli

Re: [ADMIN] archive_command

2005-10-01 Thread Jeff Frost
On Fri, 30 Sep 2005, Simon Riggs wrote: If I follow your example, yes. But that assumes there is only one timeline's WAL files in your pg_xlog. It could get more complex in that situation because you could be in any of the timelines. But, if you know which timeline you're in, then yes, the file

Re: [ADMIN] archive_command

2005-10-01 Thread Simon Riggs
On Fri, 2005-09-30 at 09:29 -0700, Jeff Frost wrote: > On Fri, 30 Sep 2005, Simon Riggs wrote: > > > You don't say why you need to know? > > Not sure why Kris needs to know, but I need to know for PITR and keeping the > latest WAL file saved by a script which runs every few minutes as my client

Re: [ADMIN] archive_command

2005-09-30 Thread Jeff Frost
On Fri, 30 Sep 2005, Simon Riggs wrote: You don't say why you need to know? Not sure why Kris needs to know, but I need to know for PITR and keeping the latest WAL file saved by a script which runs every few minutes as my client does not turn over WAL files very often (about 4/day). If yo

Re: [ADMIN] archive_command

2005-09-30 Thread Simon Riggs
On Wed, 2005-09-28 at 12:08 -0500, Kris Kiger wrote: > My question then is, how do we tell which wal log is X (the one > currently being written to)? You don't say why you need to know? If you really care, you can look at the status files in the archive_status directory underneath pg_xlog. This

Re: [ADMIN] archive_command

2005-09-28 Thread Jeff Frost
On Wed, 28 Sep 2005, Kris Kiger wrote: that all relevant wal logs have been archived, save the current one. My question then is, how do we tell which wal log is X (the one currently being written to)? I do something like this in my scripting: ls -rt /pg_xlog/ | grep -v "backup\|archive" | ta

Re: [ADMIN] archive_command

2005-09-28 Thread Kris Kiger
Jeff: I see, that does make a lot of sense ;-). Thanks However, that answer brings me to another question: To begin with an example, lets say we start the server and are writing to wal file X, however postgres has preallocated wal files up to X+7. We assume that archive command will be invoked

Re: [ADMIN] archive_command

2005-09-28 Thread Jeff Frost
Kris, It is invoked when the WAL file is filled. I believe the server preallocates 8 or so of them on startup. On Wed, 28 Sep 2005, Kris Kiger wrote: set to use rsync copy the wal log from server A to server B. When i'm watching the number of wal files on server A I notice sometimes there

[ADMIN] archive_command

2005-09-28 Thread Kris Kiger
I've been playing around with recovery and am a bit confused as to when this method gets invoked. At the moment, I have two servers set up, both of them with postgres installed. Lets call them server A and server B. Server A is running postgres and processing transactions. Server B has