Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 248849FB586 for ; Tue, 19 Jun 2007 13:39:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 78762-03-2 for ; Tue, 19 Jun 2007 13:38:56 -0300 (ADT) X-Greylist: delayed 00:22:01.665724 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id BFD169FB65D for ; Tue, 19 Jun 2007 13:38:56 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.jobflash.com (mail.jobflash.com [67.108.12.41]) by svr4.postgresql.org (Postfix) with ESMTP id 0793D5AF041 for ; Tue, 19 Jun 2007 16:16:53 +0000 (GMT) Received: from [192.168.1.76] (adsl-75-36-138-16.dsl.pltn13.sbcglobal.net [75.36.138.16]) by mail.jobflash.com (Postfix) with ESMTP id 6CC8A42140; Tue, 19 Jun 2007 09:16:52 -0700 (PDT) Message-ID: <46780175.3040207@jobflash.com> Date: Tue, 19 Jun 2007 09:16:53 -0700 From: Tom Arthurs User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 To: George Wilk Cc: pgsql-admin@postgresql.org Subject: Re: archive_command does not execute References: <002c01c7b26b$d0085400$0d7ba8c0@ellacoya.com> In-Reply-To: <002c01c7b26b$d0085400$0d7ba8c0@ellacoya.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200706/180 X-Sequence-Number: 25848 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 relevant fragment of my conf file: > > > > fsync = on # turns forced synchronization > on or off > > wal_sync_method = fsync # the default is the first option > > # supported by the operating > system: > > # open_datasync > > # fdatasync > > # fsync > > # fsync_writethrough > > # open_sync > > #full_page_writes = on # recover from partial page writes > > #wal_buffers = 8 # min 4, 8KB each > > #commit_delay = 0 # range 0-100000, in microseconds > > #commit_siblings = 5 # range 1-1000 > > > > # - Checkpoints - > > > > checkpoint_segments = 1 # in logfile segments, min 1, 16MB each > > checkpoint_timeout = 30 # range 30-3600, in second > > checkpoint_warning = 5 # in seconds, 0 is off > > > > # - Archiving - > > archive_command = 'touch /var/lib/pgsql/bkp/myfile' > > > > > > Here is my log entry for the duration of the test: > > > > FATAL: terminating connection due to administrator command > > LOG: shutting down > > LOG: database system is shut down > > LOG: database system was shut down at 2007-06-19 07:48:03 EDT > > LOG: checkpoint record is at 0/899E68 > > LOG: redo record is at 0/899E68; undo record is at 0/0; shutdown TRUE > > LOG: next transaction ID: 2445; next OID: 16399 > > LOG: next MultiXactId: 1; next MultiXactOffset: 0 > > LOG: database system is ready > > LOG: transaction ID wrap limit is 2147484146, limited by database > "postgres" > > > > Thanks in advance, > > > > ~george > George 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 logfile. FWIW, here's what my solaris 9, posgresql 8.1.8 system has as an archive command: archive_command = 'test ! -f /data/archivelog/%f && cp %p /data/archivelog/%f' adjust as needed for your directory structure. you need to run enough commited transactions through to fill up a 16 meg xlog. Then you will see the xlog getting archived (or your "myfile" get updated).