WAL archiving and deletion of the WAL segments

Started by Just Someonealmost 20 years ago3 messagesgeneral
Jump to latest
#1Just Someone
just.some@gmail.com

I implemented wal archiving and it seems to be working. The segments
are being copied by the shell script, and in the pg_log file I see
this line:

LOG: archived transaction log file "000000010000001D00000096"

But the file is still int he pg_xlog directory. In the documentation I
read that it might either delete or recycle the segment files. As I
still see it in the directory, I want to make absolutely sure my
archiving is working correctly.

So my question is: Is what I'm seeing meaning the WAL archiving is
working? Or should I expect the file to be deleted?

Bye,

Guy.

--
Family management on rails: http://www.famundo.com - coming soon!
My development related blog: http://devblog.famundo.com

#2Alan Hodgson
ahodgson@simkin.ca
In reply to: Just Someone (#1)
Re: WAL archiving and deletion of the WAL segments

On April 10, 2006 09:28 am, "Just Someone" <just.some@gmail.com> wrote:

I implemented wal archiving and it seems to be working. The segments
are being copied by the shell script, and in the pg_log file I see
this line:

LOG: archived transaction log file "000000010000001D00000096"

But the file is still int he pg_xlog directory. In the documentation I
read that it might either delete or recycle the segment files. As I
still see it in the directory, I want to make absolutely sure my
archiving is working correctly.

So my question is: Is what I'm seeing meaning the WAL archiving is
working? Or should I expect the file to be deleted?

If the file is showing up in your archive target location, it's working.
The file will remain in the pg_xlog directory for some time, and then
eventually be recycled. Based on the message, I would say it's working
fine.

--
Alan

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Alan Hodgson (#2)
Re: WAL archiving and deletion of the WAL segments

Alan Hodgson <ahodgson@simkin.ca> writes:

On April 10, 2006 09:28 am, "Just Someone" <just.some@gmail.com> wrote:

So my question is: Is what I'm seeing meaning the WAL archiving is
working? Or should I expect the file to be deleted?

If the file is showing up in your archive target location, it's working.
The file will remain in the pg_xlog directory for some time, and then
eventually be recycled.

I'd expect the file to be renamed or deleted at the next checkpoint, so
"eventually" is not very long, unless you've increased the checkpoint
spacing parameters quite a lot ...

regards, tom lane