Search Postgresql Archives

Backing up the currently used wal segment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

I've implemented replication to a warm standby using wal
logshipping now. The only remaining problem is that there
is no way in 8.1 to force postgres to close the current
wal segment, and start using a new one.

Therefor, if there is little traffic, changes can take
a long time to actually replicate, increasing the time-window
of chances which might be lost in case of a crash.

I believe that people are solving this by periodically
copying the currently used wal to the backup server.

I'd like to implement that scheme, but am unsure how
to determine that segment reliably. I noticed that
there is an pg_xlog/archive_status directory, which
contains *.done files for some of the archived wal logs.

Can I safely assume that the wal with the smallest
serial number for which there is no corresponding
file in archive_status is the current used wal?

At the moment pg_xlog/archive_status contains:
00000001000000020000007E.00F95E0C.backup.done
000000010000000200000087.done
000000010000000200000088.don

while pg_xlog contains:
00000001000000020000007E.00F95E0C.backup
000000010000000200000087
000000010000000200000088
000000010000000200000089
00000001000000020000008A
00000001000000020000008B
00000001000000020000008C
00000001000000020000008D
00000001000000020000008E

My guess is that 000000010000000200000089 is currently used, and
that 00000001000000020000008A - 00000001000000020000008E where
created for future use (Why I wouldn't know). Is that assumption correct?

greetings, Florian Pflug


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux