Re: Continuous archiving fails routinely with "invalid magic number" error

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

 



"Bruce Reed" <breed@xxxxxxxxxxx> writes:
> I am having problems getting continuous archiving to work reliably on my
> Postgres 8.3 system. My primary is running 8.3.1, has archiving turned on
> and writes logs to a NFS mount that lives on the backup server. The warm
> standby is running 8.3.3. Initially things work fine with the primary
> copying logs to the archive directory correctly and the warm standby  in
> recovery mode plays them back okay. At some point the following appears in
> the syslog:

I'm wondering whether you are doing anything to ensure that the copy
operation appears atomic to the standby?  This behavior looks about like
what I'd expect if the standby tried to read a WAL file before it'd been
completely copied.  You might try copying files to some temporary name
that doesn't look like a WAL file name, and then renaming them into
place when the copy is complete.

BTW, I see another issue here:

> May 26 08:59:26 ods2-prod postgres[3827]: [1432-1] LOG:  could not create
> archive status file "pg_xlog/archive_status/00000002.history.ready": No such
> file or directory

Does the archive_status/ subdirectory exist?  If not, create it by hand,
making sure it has the same ownership and permissions as pg_xlog/.
It's fairly easy to forget to recreate this directory when you are
setting up a backup system.  CVS HEAD has some code to recreate it
automatically if it's not there, but that's not in 8.3.

			regards, tom lane

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux