Обсуждение: WARNING: some databases have not been vacuumed in 1953945422 transactions

Поиск
Список
Период
Сортировка

WARNING: some databases have not been vacuumed in 1953945422 transactions

От
"MG"
Дата:
Hello,
 
we are using PostgreSQL 8.0.3 and have two databases in one cluster. db1 and db2.
Each night a shell script is being executed.
 
vacuumdb --analyze -U cmduser db1
vacuumdb --analyze -U cmduser db2
 
The last weeks the following warnings are given out:
WARNING:  some databases have not been vacuumed in 1953945422 transactions
HINT:  Better vacuum them within 193538225 transactions, or you may have a wraparound failure.
 
Now I made the sql-statement:
SELECT datname, age(datfrozenxid) FROM pg_database;
 
 Yesterday I got this result: 
datname age
db11.090.080.531
db21.940.858.511
template11.940.858.511
template01.940.858.511
 
Today I got the following result:
 
datnameage
db11.075.558.667
db21.075.513.031
template11.955.716.521
template01.955.716.521
 
Why are there changes of the databases template1 and template0 ?!?
 
Is this critical?
 
Regards
Michaela

 
 

Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
Tom Lane
Дата:
"MG" <pgsql-general@carladata.de> writes:
> Each night a shell script is being executed.

> vacuumdb --analyze -U cmduser db1
> vacuumdb --analyze -U cmduser db2

You need to hit template1 every so often, too.  You probably might
as well just do that every night; it won't take long.

> The last weeks the following warnings are given out:
> WARNING:  some databases have not been vacuumed in 1953945422 =
> transactions

> Is this critical?

Yes.

            regards, tom lane

Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
"MG"
Дата:
Hello Tom,

thanks for your answer.

But I don't understand why there are changes of the databases template1 and
template0 at all?
I thought they are only templates.

Regards
Michaela

----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: "MG" <pgsql-general@carladata.de>
Cc: <pgsql-general@postgresql.org>
Sent: Thursday, February 15, 2007 4:57 PM
Subject: Re: [GENERAL] WARNING: some databases have not been vacuumed in
1953945422 transactions


> "MG" <pgsql-general@carladata.de> writes:
>> Each night a shell script is being executed.
>
>> vacuumdb --analyze -U cmduser db1
>> vacuumdb --analyze -U cmduser db2
>
> You need to hit template1 every so often, too.  You probably might
> as well just do that every night; it won't take long.
>
>> The last weeks the following warnings are given out:
>> WARNING:  some databases have not been vacuumed in 1953945422 =
>> transactions
>
>> Is this critical?
>
> Yes.
>
> regards, tom lane
>


Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
"Albe Laurenz"
Дата:
> But I don't understand why there are changes of the databases
> template1 and
> template0 at all?
> I thought they are only templates.

I don't think that there were any changes to the template databases.

You detected a difference in age(datfrozenxid) - try selecting
datfrozenxid
itself and you will probably see that it does not change over time.

Yours,
Laurenz Albe

Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
"MG"
Дата:
Yes there are changes.
db1, db2 and template1 has been vacuumed over night, not template0.
 20.02.07 datname - (12) age - (4)
      1 db1 1.075.878.187
      2 db2 1.075.847.556
      3 template1 1.976.569.889
      4 template0 1.976.569.889




      21.02.07 datname - (12) age - (4)
      1 db1 1.074.758.205
      2 db2 1.074.728.832
      3 template1 1.074.728.720
      4 template0 1.978.965.587


Regards
Michaela


----- Original Message -----
From: "Albe Laurenz" <all@adv.magwien.gv.at>
To: "MG *EXTERN*" <pgsql-general@carladata.de>
Cc: <pgsql-general@postgresql.org>
Sent: Monday, February 19, 2007 9:41 AM
Subject: Re: [GENERAL] WARNING: some databases have not been vacuumed in
1953945422 transactions


> But I don't understand why there are changes of the databases
> template1 and
> template0 at all?
> I thought they are only templates.

I don't think that there were any changes to the template databases.

You detected a difference in age(datfrozenxid) - try selecting
datfrozenxid
itself and you will probably see that it does not change over time.

Yours,
Laurenz Albe

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
Richard Huxton
Дата:
MG wrote:
> Yes there are changes.
> db1, db2 and template1 has been vacuumed over night, not template0.

>      4 template0 1.976.569.889

>      4 template0 1.978.965.587

Not necessarily - the age is the count of how many transactions have
occurred ACROSS ALL DATABASES since the "datfrozenxid" in that database.

--
   Richard Huxton
   Archonet Ltd

Re: WARNING: some databases have not been vacuumed in 1953945422 transactions

От
"Albe Laurenz"
Дата:
MG wrote:
>> I don't think that there were any changes to the template databases.
>>
>> You detected a difference in age(datfrozenxid) - try selecting
>> datfrozenxid itself and you will probably see that it does not
>> change over time.
>
> Yes there are changes.
> db1, db2 and template1 has been vacuumed over night, not template0.
>  20.02.07 datname - (12) age - (4)
>       1 db1 1.075.878.187
>       2 db2 1.075.847.556
>       3 template1 1.976.569.889
>       4 template0 1.976.569.889
>
>
>
>
>       21.02.07 datname - (12) age - (4)
>       1 db1 1.074.758.205
>       2 db2 1.074.728.832
>       3 template1 1.074.728.720
>       4 template0 1.978.965.587

What do you mean by (12) age - (4)?

I told you to select datfrozenxid and not age(datfrozenxid).

Try and vacuum ALL databases.

Yours,
Laurenz Albe