pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bartosz Nowak <grubby@go2.pl>
Cc: pgsql-admin@postgresql.org
Subject: Re: pg_dumpall problem - duplicated users
Date: Thu, 01 Sep 2005 14:26:16 -0400
Message-ID: <4997.1125599176@sss.pgh.pa.us> (raw)
In-Reply-To: <431739CD.1030906@go2.pl>
References: <431739CD.1030906@go2.pl>

Bartosz Nowak <grubby@go2.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



view thread (10+ messages)  latest in thread

Message-ID: <4997.1125599176@sss.pgh.pa.us>
Permalink:  ../4997.1125599176@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4997.1125599176@sss.pgh.pa.us

 · 

reply

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-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, grubby@go2.pl
  Subject: Re: pg_dumpall problem - duplicated users
  In-Reply-To: <4997.1125599176@sss.pgh.pa.us>
  References: <431739CD.1030906@go2.pl> <4997.1125599176@sss.pgh.pa.us>

* 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