Re: Reliable WAL file shipping over unreliable network

From: Rui DeSousa <rui(dot)desousa(at)icloud(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: scott ribe <scott_ribe(at)elevated-dev(dot)com>, Mark Kirkwood <mark(dot)kirkwood(at)catalyst(dot)net(dot)nz>, Dianne Skoll <dfs(at)roaringpenguin(dot)com>, pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: Reliable WAL file shipping over unreliable network
Date: 2018-03-05 14:52:53
Message-ID: ABC9F093-7249-498E-901B-6ADB7BBA3B22@icloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> On Mar 5, 2018, at 6:15 AM, Stephen Frost <sfrost(at)snowman(dot)net> wrote:
>
> Using replication slots and pg_receivewal can be a good solution if
> you're on a version which supports the combination of both. That
> doesn't mean the proposed archive commands are any good though, just to
> be clear. An issue with pg_receivewal though is that it's
> single-threaded.

I must say this is a bit absurd; I didn’t realize that telling someone not to delete Postgres WAL files from underneath Postgres would require me to provide a complete redundant backup solution.

Pg_receivxlog or the archive_command being single threaded is not an issue; at least not for me and I’m generating 1/2TB of WALs a day. The real problem is that applying the WALs is single threaded — trying to apply a single days worth of WALs takes too long and is one of the reasons I take multiple backups a day to reduce the number of WALs required during a PITR.

The solution you proposed; would not be able to keep up with the rate of backups I issue daily nor is it capable of taking a backups on the replica at least not yet from the presentation I reviewed. I do my backups on replicas at multiple sites with WAL files also being stored at multiple sites. I also do daily restores in a lower environment which take less than 5 minutes to do — obviously I’m making extensive use of snapshots and snapshot replication.

If your archive server is crashing then you have other issues and one should work to remove single points of failure. I’m not sure what filesystem you’re using but the one I use sync to disk every 30 seconds.

The original poster stated that rsync wasn’t even an option and it not even using it. I’m not here trying to push a backup solution or anything else; I was just trying give some simple advice to the given problem.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Stephen Frost 2018-03-05 15:02:18 Re: Reliable WAL file shipping over unreliable network
Previous Message Stephen Frost 2018-03-05 11:15:21 Re: Reliable WAL file shipping over unreliable network