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

Re: WAL FILES

From: "Ashish Karalkar" <ashish(dot)karalkar(at)info-spectrum(dot)com>
To: "Khan, Mahmood Ahram" <Mahmood(dot)Khan(at)in(dot)unisys(dot)com>
Cc: <pgsql-admin(at)postgresql(dot)org>
Subject: Re: WAL FILES
Date: 2007-05-18 04:54:56
Message-ID: 002a01c79908$b2ce4880$170211ac@LIONKING.COM (view raw or flat)
Thread:
Lists: pgsql-admin
take care to inclue a parameter in the copy command that will make sure the archived WAL will not be overwritten


for your reference(on Linux)


    "It is important that the archive command return zero exit status if and only if it succeeded. Upon getting a zero result, PostgreSQL will assume that the WAL segment file has been successfully archived, and will remove or recycle it. However, a nonzero status tells PostgreSQL that the file was not archived; it will try again periodically until it succeeds. 
The archive command should generally be designed to refuse to overwrite any pre-existing archive file. This is an important safety feature to preserve the integrity of your archive in case of administrator error (such as sending the output of two different servers to the same archive directory). It is advisable to test your proposed archive command to ensure that it indeed does not overwrite an existing file, and that it returns nonzero status in this case. We have found that cp -i does this correctly on some platforms but not others. If the chosen command does not itself handle this case correctly, you should add a command to test for pre-existence of the archive file. "


  ----- Original Message ----- 
  From: Khan, Mahmood Ahram 
  To: Ashish Karalkar 
  Sent: Friday, May 18, 2007 9:07 AM
  Subject: RE: [ADMIN] WAL FILES


  Thanks Ashish,

   

  Its working fine now. And I set the archive timeout parameter to 25. (i,e 25 seconds).

   

  So Thanks once again.

   

   

   

   

  Thanks & Best Regards

   

  M.AHRAM KHAN 


------------------------------------------------------------------------------

  From: Ashish Karalkar [mailto:ashish(dot)karalkar(at)info-spectrum(dot)com] 
  Sent: Thursday, May 17, 2007 6:26 PM
  To: Khan, Mahmood Ahram
  Subject: Re: [ADMIN] WAL FILES

   

  I think u should try

   

  archive_command = ' copy  %p d:\archive\%f '

   

   

  I hope this should work.

  I am not  windows user but still i think.

  Please let me know if it works.

   

  set the archive timeout para to lower value to see it works or nt immediately.

   

  With regards

  Ashish...

    ----- Original Message ----- 

    From: Khan, Mahmood Ahram 

    To: pgsql-admin(at)postgresql(dot)org 

    Sent: Thursday, May 17, 2007 4:42 PM

    Subject: [ADMIN] WAL FILES

     

     

    Hi All,

     

    I am archiving PostgreSQL Database. I want to copy all my WAL files from pg_xlogs folder to d:\archive

    I am using PostgreSQL 8.2 on Windows XP.

    And my archive_command looks like this      ( archive_command  copy c:\Program Files\PostgreSQL\8.2\data\pg_xlog d:\archive\  )

    But it is loading the files in pg_xlogs folder itself. So Can anybody have idea about this.

     

     

    Thanks & Regards

     

    M.AHRAM KHAN

     

     

     

In response to

  • WAL FILES at 2007-05-17 11:12:57 from Khan, Mahmood Ahram

Responses

pgsql-admin by date

Next:From: Ritu KhetanDate: 2007-05-18 05:13:23
Subject: Postgres error
Previous:From: Paul LambertDate: 2007-05-18 04:34:05
Subject: Re: Capacity of Data

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