Re: Cluster "stuck" in "not accepting commands to avoid wraparound data loss"

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Cluster "stuck" in "not accepting commands to avoid wraparound data loss"
Date: 2015-12-16 17:52:37
Message-ID: CA+TgmoZSF=gq_TVuMpvtAxEDRSLaz+VZC3CX3ASutc6+gCh7Qg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 11, 2015 at 1:08 PM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:
> Since changes to datfrozenxid are WAL logged at the time they occur,
> but the supposedly-synchronous change to ShmemVariableCache is not WAL
> logged until the next checkpoint, a well timed crash can leave you in
> the state where the system is in a tizzy about wraparound but each
> database says "Nope, not me".

ShmemVariableCache is an in-memory data structure, so it's going to
get blown away and rebuilt on a crash. But I guess it gets rebuild
from the contents of the most recent checkpoint record, so that
doesn't actually help. However, I wonder if it would be safe to for
the autovacuum launcher to calculate an updated value and call
SetTransactionIdLimit() to update ShmemVariableCache.

But I'm somewhat confused what this has to do with Andres's report.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-12-16 17:54:42 Re: use_remote_estimate usage for join pushdown in postgres_fdw
Previous Message Robert Haas 2015-12-16 17:36:40 Re: Re: Reusing abbreviated keys during second pass of ordered [set] aggregates