Re: [RFC] What should we do for reliable WAL archiving?

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [RFC] What should we do for reliable WAL archiving?
Date: 2014-03-16 14:23:26
Message-ID: 4D837AAE66BA4BE980F13FC061E86FC1@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Amit Kapila" <amit(dot)kapila16(at)gmail(dot)com>
> How about using pg_receivexlog for archiving purpose?

pg_receivexlog is good in that it does fsync(). But it seems difficult to
use correctly, and I'm not sure if I can catch all WAL segments without any
loss. pg_receivexlog must be started with postmaster and monitored with
some measures. This won't be very easy at least on Windows.

The pg_receivexlog reference page suggests another difficulty:

Notes
When using pg_receivexlog instead of archive_command, the server will
continue to recycle transaction log files even if the backups are not
properly archived, since there is no command that fails. This can be worked
around by having an archive_command that fails when the file has not been
properly archived yet, for example:
archive_command = 'sleep 5 && test -f /mnt/server/archivedir/%f'

This suggestion is not correct, because it only checks the existence of the
file. What if the file size is less than 16MB? How can we check if the
file is completely archived?

Regards
MauMau

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2014-03-16 14:31:06 Re: requested shared memory size overflows size_t
Previous Message Erik Rijkers 2014-03-16 14:10:31 Re: jsonb status - 'JsonbValue' has no member named 'size'