Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id D63B8632757 for ; Tue, 13 Apr 2010 21:47:02 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 25623-08 for ; Wed, 14 Apr 2010 00:46:51 +0000 (UTC) X-Greylist: delayed 00:05:24.034671 by SQLgrey-1.7.6 Received: from imail.internode.com.au (exchht02-ext.internode.com.au [203.26.95.186]) by mail.postgresql.org (Postfix) with ESMTP id 49EBE6325ED for ; Tue, 13 Apr 2010 21:46:51 -0300 (ADT) Received: from EXCHMAIL.staff.internode.com.au ([169.254.2.211]) by exchht02.staff.internode.com.au ([fe80::db2:3e78:2ae:9bfb%12]) with mapi; Wed, 14 Apr 2010 10:11:23 +0930 From: Samuel Stearns To: "pgsql-admin@postgresql.org" Date: Wed, 14 Apr 2010 10:11:22 +0930 Subject: More than 1 pg_database Entry for Database - Thread #2 Thread-Topic: More than 1 pg_database Entry for Database - Thread #2 Thread-Index: AcrbazTKR0sA1BO/Rv+HMk9Xc9gkIQ== Message-ID: <68B59BEDCD36854AADBDF17E91B2937AB89DE232@EXCHMAIL.staff.internode.com.au> Accept-Language: en-US, en-AU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, en-AU Content-Type: multipart/alternative; boundary="_000_68B59BEDCD36854AADBDF17E91B2937AB89DE232EXCHMAILstaffin_" MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.909 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201004/170 X-Sequence-Number: 34264 --_000_68B59BEDCD36854AADBDF17E91B2937AB89DE232EXCHMAILstaffin_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Howdy, I am running version 8.3.3 and encountered a problem with my pg_dump failin= g a couple weeks back with the following error: pg_dump: query returned more than one (2) pg_database entry for database "s= qlsnbs" pg_dumpall: pg_dump failed on database "sqlsnbs", exiting I followed your thread here: http://www.mail-archive.com/pgsql-admin@postgresql.org/msg25978.html in an attempt to resolve the problem and in the end, just like was stated i= n the above thread, I ended up dumping the old Postgres environment into a = new initialized one to resolve the problem. I did not capture the queries I was running at the time of diagnosing but I= can summarize. I ran the following query: select xmin, cmin, xmax, cmax, oid, ctid, datname from pg_database; which returned the same oid and different xmax for each row of the duplicat= e database. One xmax was 0 and the other was 3.7 billion. In your thread = above it was stated by Tom Lane that the large xmax number may indicate a p= roblem with xid wraparound and that the problem row was never vacuumed away= due to broken vacuuming procedures. We were running with auto-vacuum turn= ed on and I verified that it was working by querying pg_stat_all_tables. I was wondering if you could please answer the following for me to help mit= igate this in the future: 1. Should I be running a scheduled vacuum analyze in addition to the auto-= vacuum? 2. Should I be running a scheduled vacuum full? 3. Does 8.4 address this problem? Thank you, Sam --_000_68B59BEDCD36854AADBDF17E91B2937AB89DE232EXCHMAILstaffin_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Howdy,

 

I am running version 8.3.3 and encountered a problem wit= h my pg_dump failing a couple weeks back with the following error:

 

pg_dump: query returne= d more than one (2) pg_database entry for database "sqlsnbs"<= /span>

pg_dumpall: pg_dump fa= iled on database "sqlsnbs", exiting

 

I followed your thread here:

 

http://www.mail-archive.com/pgsql-admin@postgresql.org/msg25978.html=

 

in an attempt to resolve the problem and in the end, jus= t like was stated in the above thread, I ended up dumping the old Postgres environment into a new initialized one to resolve the problem.

 

I did not capture the queries I was running at the time = of diagnosing but I can summarize.  I ran the following query:=

 

select xmin, cmin, xmax, cmax, oid, ctid, datname from pg_database;

 

which returned the same oid and different xmax for each = row of the duplicate database.  One xmax was 0 and the other was 3.7 billi= on.  In your thread above it was stated by Tom Lane that the large xmax number may indicate a problem with xid wraparound and that the problem row was never vacuumed awa= y due to broken vacuuming procedures.  We were running with auto-vacuum turned on and I verified that it was working by querying pg_stat_all_tables= .

 

I was wondering if you could please answer the following= for me to help mitigate this in the future:

 

1.  Should I be running a scheduled vacuum analyze = in addition to the auto-vacuum?

2.  Should I be running a scheduled vacuum full?

3.  Does 8.4 address this problem?

 

Thank you,

 

Sam

--_000_68B59BEDCD36854AADBDF17E91B2937AB89DE232EXCHMAILstaffin_--