Re: recovery_connections cannot start (was Re: master in standby mode croaks)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: recovery_connections cannot start (was Re: master in standby mode croaks)
Date: 2010-04-23 20:11:38
Message-ID: 15689.1272053498@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> Well, I think the real hole is that turning archive_mode=on results in
> WAL never being deleted unless it's successfully archived.

Hm, good point. And at least in principle you could have SR setups
that don't care about having a backing WAL archive.

> But we might be able to handle that like this:

> wal_mode={standby|archive|crash} # or whatever
> wal_segments_always=<integer> # keep this many segments always, for
> SR - like current wal_keep_segments
> wal_segments_unarchived=<integer> # keep this many unarchived
> segments, -1 for infinite
> max_wal_senders=<integer> # same as now
> archive_command=<string> # same as now

> So we always retain wal_segments_always segments, but if we have
> trouble with archiving we'll retain up to wal_segments_archived.

And when that limit is reached, what happens? Panic shutdown?
Silently drop unarchived data? Neither one sounds very good.

I think either you want your WAL archived or you don't. "Archive
if it's convenient" doesn't sound like a useful operating mode.
So maybe we do indeed need to keep archive_mode as a separate toggle.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-04-23 20:22:00 Re: pgsql: Make CheckRequiredParameterValues() depend upon correct
Previous Message Heikki Linnakangas 2010-04-23 20:10:54 Re: recovery_connections cannot start (was Re: master in standby mode croaks)