pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedWAL FILES
4+ messages / 3 participants
[nested] [flat]
* WAL FILES
@ 2007-05-17 11:12 Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>
0 siblings, 2 replies; 4+ messages in thread
From: Khan, Mahmood Ahram @ 2007-05-17 11:12 UTC (permalink / raw)
To: pgsql-admin
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: WAL FILES
@ 2007-05-18 04:54 Ashish Karalkar <ashish.karalkar@info-spectrum.com>
parent: Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>
1 sibling, 1 reply; 4+ messages in thread
From: Ashish Karalkar @ 2007-05-18 04:54 UTC (permalink / raw)
To: Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>; +Cc: 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.karalkar@info-spectrum.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@postgresql.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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: WAL FILES
@ 2007-05-18 05:26 Ashish Karalkar <ashish.karalkar@info-spectrum.com>
parent: Ashish Karalkar <ashish.karalkar@info-spectrum.com>
0 siblings, 0 replies; 4+ messages in thread
From: Ashish Karalkar @ 2007-05-18 05:26 UTC (permalink / raw)
To: Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>; +Cc: pgsql-admin
I give you idea to reduce archive time out parameter just to check wether archiving is working or not.
Yes you are right,PostgreSQL will generate 16 MB of WAL file each time. So if u keep para archive timeout to 0 then after filling 16 MB data in WAL file postgre will switch over to new file.
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: WAL FILES
@ 2007-05-21 11:00 Kis <kjt@takarnet.hu>
parent: Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>
1 sibling, 0 replies; 4+ messages in thread
From: Kis János Tamás @ 2007-05-21 11:00 UTC (permalink / raw)
To: pgsql-admin
2007. május 17. 13.12 dátummal Khan, Mahmood Ahram ezt írta:
>
> 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.
>
Did you read the chapter 17.5.3 in the PostgreSQL 8.2 Documentation?
Bye,
kjt
McAfee SCM 4.1 által ellenőrizve!
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2007-05-21 11:00 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-05-17 11:12 WAL FILES Khan, Mahmood Ahram <Mahmood.Khan@in.unisys.com>
2007-05-18 04:54 ` Ashish Karalkar <ashish.karalkar@info-spectrum.com>
2007-05-18 05:26 ` Ashish Karalkar <ashish.karalkar@info-spectrum.com>
2007-05-21 11:00 ` Kis <kjt@takarnet.hu>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox