Re: pg_dumpall problem - duplicated users

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bartosz Nowak <grubby(at)go2(dot)pl>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dumpall problem - duplicated users
Date: 2005-09-01 18:26:16
Message-ID: 4997.1125599176@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Bartosz Nowak <grubby(at)go2(dot)pl> 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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message GRUbY 2005-09-01 19:08:54 Re: pg_dumpall problem - duplicated users
Previous Message GRUbY 2005-09-01 17:17:27 Re: pg_dumpall problem - duplicated users