Thread: What's the impact of archive_command failing?
I have postgres setup for streaming replication and my slave box went down. My question is, how long can that box stay down before it causes a material impact on the master? The archive_command that I use will not archive logs while the slave is down. I know the obvious problems: * you're not archiving, so you lose all of the recovery related benefits if you should crash * could run out of disk space in pg_xlog * your slave could get out of sync What i'm concerned with is something like, if the master is unable to archive eventually it will stop writing WALs Or something impacting the performance of the database. or anything along those lines. Thanks
On Tue, Oct 18, 2011 at 4:58 PM, David Kerr <dmk@mr-paradox.net> wrote: > I have postgres setup for streaming replication and my slave box went down. > > My question is, how long can that box stay down before it causes a material impact on the master? > > The archive_command that I use will not archive logs while the slave is down. > > I know the obvious problems: > * you're not archiving, so you lose all of the recovery related benefits if you should crash > * could run out of disk space in pg_xlog > * your slave could get out of sync > > What i'm concerned with is something like, if the master is unable to archive eventually > it will stop writing WALs Or something impacting the performance of the database. > or anything along those lines. When it comes back up it will have to catchup. At some point it will be quicker to regenerate the standby than to catchup. Also, at some point you will run out of space in pg_xlog, which would make the master crash. So probably best to have an archive_command that starts deleting or compressing files before disk fills, but that means your slave can then never catch up at that point. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
On 10/18/2011 09:44 AM, Simon Riggs wrote: > On Tue, Oct 18, 2011 at 4:58 PM, David Kerr<dmk@mr-paradox.net> wrote: > >> I have postgres setup for streaming replication and my slave box went down. >> >> My question is, how long can that box stay down before it causes a material impact on the master? >> >> The archive_command that I use will not archive logs while the slave is down. >> >> I know the obvious problems: >> * you're not archiving, so you lose all of the recovery related benefits if you should crash >> * could run out of disk space in pg_xlog >> * your slave could get out of sync >> >> What i'm concerned with is something like, if the master is unable to archive eventually >> it will stop writing WALs Or something impacting the performance of the database. >> or anything along those lines. > > > When it comes back up it will have to catchup. At some point it will > be quicker to regenerate the standby than to catchup. > > Also, at some point you will run out of space in pg_xlog, which would > make the master crash. So probably best to have an archive_command > that starts deleting or compressing files before disk fills, but that > means your slave can then never catch up at that point. > Ok, that's better that I thought. Thanks!