From: Alvaro Herrera <alvherre@commandprompt.com>
To: Torsten Zuehlsdorff <foo@meisterderspiele.de>
Cc: Pg Bugs <pgsql-bugs@postgresql.org>
Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
Date: Fri, 11 Nov 2011 10:32:59 -0300
Message-ID: <1321018019-sup-8282@alvh.no-ip.org> (raw)
In-Reply-To: <4EBCD414.90706@meisterderspiele.de>
References: <CAJjz_NiGct3iLipCk9JC2TY5u+u9A0CzvH64zys+V=nYSG-zUw@mail.gmail.com>
<201111091648.pA9GmXK23629@momjian.us>
<CAJjz_NjT_yH9TEju1fNhkCfXLLKR9d9p57wUi=rzEbuWk46xww@mail.gmail.com>
<4EBB3443.2020709@ringerc.id.au>
<CAJjz_NjPvjrn=fePXDc78SD=0ZcrOY2L19ewhVWCUxLLOLPmng@mail.gmail.com>
<4EBB70D7.4000506@enterprisedb.com>
<4EBB816C.2050402@meisterderspiele.de>
<4EBB8A0C.4030704@hogranch.com>
<4EBB98B8.6080202@meisterderspiele.de>
<4EBBA573.2060901@enterprisedb.com>
<4EBCD414.90706@meisterderspiele.de>
Excerpts from Torsten Zuehlsdorff's message of vie nov 11 04:51:48 -0300 2011:
> Heikki Linnakangas schrieb:
> > You won't lose data. There are safeguards in place to print warnings in
> > the log when you approach transaction wrap-around, and after a certain
> > point the system will stop accepting new transactions, to prevent data
> > loss.
>
> The manual says that autovacuum protects againt loss of very old data:
> http://www.postgresql.org/docs/9.1/static/routine-vacuuming.html
>
> So either your statement is wrong or the manual. ;)
Heikki is correct. The docs state, in the section that expands on the
single phrase talking about very old data being lost:
If for some reason autovacuum fails to clear old XIDs from a table, the
system will begin to emit warning messages like this when the database's oldest
XIDs reach ten million transactions from the wraparound point:
WARNING: database "mydb" must be vacuumed within 177009986 transactions
HINT: To avoid a database shutdown, execute a database-wide VACUUM in "mydb".
(A manual VACUUM should fix the problem, as suggested by the hint; but
note that the VACUUM must be performed by a superuser, else it will fail to
process system catalogs and thus not be able to advance the database's
datfrozenxid.) If these warnings are ignored, the system will shut down and
refuse to start any new transactions once there are fewer than 1 million
transactions left until wraparound:
ERROR: database is not accepting commands to avoid wraparound data loss in database "mydb"
HINT: Stop the postmaster and use a standalone backend to VACUUM in "mydb".
The 1-million-transaction safety margin exists to let the administrator
recover without data loss, by manually executing the required VACUUM commands.
However, since the system will not execute commands once it has gone into the
safety shutdown mode, the only way to do this is to stop the server and use a
single-user backend to execute VACUUM. The shutdown mode is not enforced by a
single-user backend. See the postgres reference page for details about using a
single-user backend.
So you don't actually lose data, but it's better not to get into that
situation in the first place.
--
Álvaro Herrera <alvherre@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: alvherre@commandprompt.com, foo@meisterderspiele.de
Subject: Re: Add statistics_collector_listen_addresses to fix hard-coding of "localhost"
In-Reply-To: <1321018019-sup-8282@alvh.no-ip.org>
References: <CAJjz_NiGct3iLipCk9JC2TY5u+u9A0CzvH64zys+V=nYSG-zUw@mail.gmail.com> <201111091648.pA9GmXK23629@momjian.us> <CAJjz_NjT_yH9TEju1fNhkCfXLLKR9d9p57wUi=rzEbuWk46xww@mail.gmail.com> <4EBB3443.2020709@ringerc.id.au> <CAJjz_NjPvjrn=fePXDc78SD=0ZcrOY2L19ewhVWCUxLLOLPmng@mail.gmail.com> <4EBB70D7.4000506@enterprisedb.com> <4EBB816C.2050402@meisterderspiele.de> <4EBB8A0C.4030704@hogranch.com> <4EBB98B8.6080202@meisterderspiele.de> <4EBBA573.2060901@enterprisedb.com> <4EBCD414.90706@meisterderspiele.de> <1321018019-sup-8282@alvh.no-ip.org>
* 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