Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D25579FB68A for ; Fri, 18 May 2007 01:59:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 60061-01 for ; Fri, 18 May 2007 01:59:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from pro33.abac.com (pro33.abac.com [66.226.64.34]) by postgresql.org (Postfix) with ESMTP id A03119FB636 for ; Fri, 18 May 2007 01:59:35 -0300 (ADT) Received: from ashishk (ppp92-7.vsnl.eth.net [61.17.93.7] (may be forged)) (authenticated bits=0) by pro33.abac.com (8.13.8/8.13.8) with ESMTP id l4I4xM8Q090479 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Thu, 17 May 2007 21:59:28 -0700 (PDT) (envelope-from ashish.karalkar@info-spectrum.com) Message-ID: <002a01c79908$b2ce4880$170211ac@LIONKING.COM> From: "Ashish Karalkar" To: "Khan, Mahmood Ahram" Cc: References: <000e01c79882$c7fc7550$170211ac@LIONKING.COM> Subject: Re: WAL FILES Date: Fri, 18 May 2007 10:24:56 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0025_01C79936.C7C92380" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/171 X-Sequence-Number: 25491 This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C79936.C7C92380 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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.=20 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 -----=20 From: Khan, Mahmood Ahram=20 To: Ashish Karalkar=20 Sent: Friday, May 18, 2007 9:07 AM Subject: RE: [ADMIN] WAL FILES Thanks Ashish, =20 Its working fine now. And I set the archive timeout parameter to 25. = (i,e 25 seconds). =20 So Thanks once again. =20 =20 =20 =20 Thanks & Best Regards =20 M.AHRAM KHAN=20 -------------------------------------------------------------------------= ----- From: Ashish Karalkar [mailto:ashish.karalkar@info-spectrum.com]=20 Sent: Thursday, May 17, 2007 6:26 PM To: Khan, Mahmood Ahram Subject: Re: [ADMIN] WAL FILES =20 I think u should try =20 archive_command =3D ' copy %p d:\archive\%f ' =20 =20 I hope this should work. I am not windows user but still i think. Please let me know if it works. =20 set the archive timeout para to lower value to see it works or nt = immediately. =20 With regards Ashish... ----- Original Message -----=20 From: Khan, Mahmood Ahram=20 To: pgsql-admin@postgresql.org=20 Sent: Thursday, May 17, 2007 4:42 PM Subject: [ADMIN] WAL FILES =20 =20 Hi All, =20 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. =20 =20 Thanks & Regards =20 M.AHRAM KHAN =20 =20 =20 ------=_NextPart_000_0025_01C79936.C7C92380 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
take care to inclue a parameter in the = copy command=20 that will make sure the archived WAL will not be = overwritten
 
 
for your reference(on = Linux)
 
 
    "It is important = that the=20 archive command return zero exit status if and only if it succeeded. = Upon=20 getting a zero result, PostgreSQL will = assume=20 that the WAL segment file has been successfully archived, and will = remove or=20 recycle it. However, a nonzero status tells PostgreSQL that the file was not archived; it = will try=20 again periodically until it succeeds.=20

The archive command should generally be designed to refuse to = overwrite any=20 pre-existing archive file. This is an important safety feature to = preserve the=20 integrity of your archive in case of administrator error (such as = sending the=20 output of two different servers to the same archive directory). It is = advisable=20 to test your proposed archive command to ensure that it indeed does not=20 overwrite an existing file, and that it = returns nonzero=20 status in this case. We have found that cp=20 -i does this correctly on some platforms but not others. If the = chosen=20 command does not itself handle this case correctly, you should add a = command to=20 test for pre-existence of the archive file. "

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

Thanks=20 Ashish,

 

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

 

So Thanks = once=20 again.

 

 

 

 

Thanks=20 & Best Regards

 

M.AHRAM=20 KHAN 


From: Ashish=20 Karalkar [mailto:ashish.karalkar@info-spectrum.com]
Sent:
Thursday, May 17, 2007 = 6:26=20 PM
To: = Khan, Mahmood Ahram
Subject: Re: [ADMIN] WAL=20 FILES

 

I think u should=20 try

 

archive_command =3D ' copy  %p = d:\archive\%f=20 '

 

 

I hope this should=20 work.

I am not =  windows user=20 but still i think.

Please let me know if it = works.

 

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

 

With=20 regards

Ashish...

----- Original Message = -----=20

From: Khan, Mahmood Ahram=20

To: pgsql-admin@postgresql.org= =20

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

Subject: [ADMIN]=20 WAL FILES

 

 

Hi=20 All,

 

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

I am using PostgreSQL = 8.2 on=20 Windows XP.

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

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

 

 

Thanks=20 & Regards

 

M.AHRAM=20 KHAN

 

 

 

------=_NextPart_000_0025_01C79936.C7C92380--