X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A2BF5D87A0 for ; Thu, 1 Sep 2005 15:26:20 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86399-03 for ; Thu, 1 Sep 2005 18:26:19 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 77904D88BF for ; Thu, 1 Sep 2005 15:26:17 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id j81IQGCB004998; Thu, 1 Sep 2005 14:26:16 -0400 (EDT) To: Bartosz Nowak Cc: pgsql-admin@postgresql.org Subject: Re: pg_dumpall problem - duplicated users In-reply-to: <431739CD.1030906@go2.pl> References: <431739CD.1030906@go2.pl> Comments: In-reply-to Bartosz Nowak message dated "Thu, 01 Sep 2005 19:26:37 +0200" Date: Thu, 01 Sep 2005 14:26:16 -0400 Message-ID: <4997.1125599176@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.006 required=5 tests=[AWL=0.006] X-Spam-Level: X-Archive-Number: 200509/5 X-Sequence-Number: 18742 Bartosz Nowak writes: > postgres=> select ctid,xmin,xmax,cmin,xmax,* from pg_shadow where > usename = 'postgres'; > ctid | xmin | xmax | cmin | xmax | usename | usesysid | > usecreatedb | usesuper | usecatupd | passwd > | valuntil | useconfig > --------+------------+-------+-------+-------+----------+----------+-------------+----------+-----------+-------------------------------------+----------+----------- > (0,1) | 1 | 50469 | 50469 | 50469 | postgres | 1 | > t | t | t | > | | > (1,25) | 2559800612 | 0 | 0 | 0 | postgres | 1 | > t | t | t | md5c084502ed11efa9d3d96d29717a5e555 > | | > (2 rows) Hmm --- clearly, that second xmin is corrupt. I'd venture that this is the result of a rolled-back (crashed?) ALTER USER SET PASSWORD operation, in which somehow the new tuple's xmin got clobbered ... and more than likely, its XMIN_COMMITTED bit got set at the same time. You could manually delete either row, probably better to zap the second one: delete from pg_shadow where ctid = '(1,25)'; and then things should be OK. A dump and reload wouldn't be a bad idea though, since there may be other corruption elsewhere that you haven't noticed yet. regards, tom lane