pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Josh Berkus <josh@agliodbs.com>
To: pgsql-hackers@postgresql.org
Subject: Re: time-delayed standbys
Date: Wed, 29 Jun 2011 18:54:19 -0700
Message-ID: <4E0BD74B.7020105@agliodbs.com> (raw)
In-Reply-To: <BANLkTi=33oiYV36cM_nOW7_Pi3t4E=P32g@mail.gmail.com>
References: <BANLkTi==TTzHDqWzwJDjmOf__8YuA7L1jw@mail.gmail.com>
	<BANLkTi=QScpDTkUw3iw6JaO15uUvx_P4qg@mail.gmail.com>
	<BANLkTimarB9eLhHpW73ja2oGvCaWNQuD6g@mail.gmail.com>
	<BANLkTi=hR3vGUDX-SQf=nFcL9ycmrQ6Fcg@mail.gmail.com>
	<BANLkTikPdjn98yjSR-VYywyjMe64wdrdDQ@mail.gmail.com>
	<26007.1303309175@sss.pgh.pa.us>
	<BANLkTikqGottQvyBzrXsARkaWMB2OEMGEA@mail.gmail.com>
	<27149.1303312506@sss.pgh.pa.us>
	<BANLkTin=22tyhK5zaNm7Nt-Q+MHcsNHdLg@mail.gmail.com>
	<BANLkTikFhVOhmf_XKERe=MkU3Ht_K7posQ@mail.gmail.com>
	<BANLkTi=COgk+8cieWxhM7YN9guYXOrDb_g@mail.gmail.com>
	<BANLkTingeD+XrxN-gDv0pzUMHrPcHWSF+A@mail.gmail.com>
	<BANLkTim8rKuUbDP=TxWmtfvZk8C1vmgmsw@mail.gmail.com>
	<BANLkTi=ufQk9i2Ria1U-c0VDUMUNxKjPgg@mail.gmail.com>
	<BANLkTi=33oiYV36cM_nOW7_Pi3t4E=P32g@mail.gmail.com>

Robert,

> I don't really see how that's any different from what happens now.  If
> (for whatever reason) the master is generating WAL faster than a
> streaming standby can replay it, then the excess WAL is going to pile
> up someplace, and you might run out of disk space.   Time-delaying the
> standby creates an additional way for that to happen, but I don't
> think it's an entirely new problem.

Not remotely new.  xlog partition full is currently 75% of the emergency
support calls PGX gets from clients on 9.0 (if only they'd pay attention
to their nagios alerts!)

> I am not sure exactly how walreceiver handles it if the disk is full.
> I assume it craps out and eventually retries, so probably what will
> happen is that, after the standby's pg_xlog directory fills up,
> walreceiver will sit there and error out until replay advances enough
> to remove a WAL file and thus permit some more data to be streamed.

Nope, it gets stuck and stops there.  Replay doesn't advance unless you
can somehow clear out some space manually; if the disk is full, the disk
is full, and PostgreSQL doesn't remove WAL files without being able to
write files first.

Manual (or scripted) intervention is always necessary if you reach disk
100% full.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



view thread (114+ messages)  latest in thread

Message-ID: <4E0BD74B.7020105@agliodbs.com>
Permalink:  ../4E0BD74B.7020105@agliodbs.com/
Also on:    postgresql.org/message-id/4E0BD74B.7020105@agliodbs.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: josh@agliodbs.com
  Subject: Re: time-delayed standbys
  In-Reply-To: <4E0BD74B.7020105@agliodbs.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox