pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Duplicate user in pg_shadow
5+ messages / 3 participants
[nested] [flat]

* Duplicate user in pg_shadow
@ 2003-10-30 04:14  CHEWTC@ap.nec.com.sg
  0 siblings, 2 replies; 5+ messages in thread

From: CHEWTC@ap.nec.com.sg @ 2003-10-30 04:14 UTC (permalink / raw)
  To: pgsql-performance


Hi
                                                                                                                      
 When I do a SELECT * FROM pg_shadow, I can have more than one user with the same id. This caused the pg_dump to      
 fail.                                                                                                                
                                                                                                                      
 I read that it happened in v7.1.2 and I am currently using v7.3.2 on Redhat v9.0                                     
                                                                                                                      
 What can be the causes and how do we rectify it?                                                                     
                                                                                                                      



Thank you,
REgards.







^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Duplicate user in pg_shadow
@ 2003-10-30 04:24  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: CHEWTC@ap.nec.com.sg
  1 sibling, 0 replies; 5+ messages in thread

From: Christopher Kings-Lynne @ 2003-10-30 04:24 UTC (permalink / raw)
  To: CHEWTC@ap.nec.com.sg; +Cc: pgsql-performance

Maybe you could delete one of the users from the pg_shadow table, do the 
dump and then after the dump is restored, recreate the dropped user (and 
it will get a new sysid)

Chris


CHEWTC@ap.nec.com.sg wrote:

> Hi
>                                                                                                                       
>  When I do a SELECT * FROM pg_shadow, I can have more than one user with the same id. This caused the pg_dump to      
>  fail.                                                                                                                
>                                                                                                                       
>  I read that it happened in v7.1.2 and I am currently using v7.3.2 on Redhat v9.0                                     
>                                                                                                                       
>  What can be the causes and how do we rectify it?                                                                     
>                                                                                                                       
> 
> 
> 
> Thank you,
> REgards.
> 
> 
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Duplicate user in pg_shadow
@ 2003-10-30 04:26  Tom Lane <tgl@sss.pgh.pa.us>
  parent: CHEWTC@ap.nec.com.sg
  1 sibling, 0 replies; 5+ messages in thread

From: Tom Lane @ 2003-10-30 04:26 UTC (permalink / raw)
  To: CHEWTC@ap.nec.com.sg; +Cc: pgsql-performance

CHEWTC@ap.nec.com.sg writes:
>  When I do a SELECT * FROM pg_shadow, I can have more than one user
>  with the same id. This caused the pg_dump to fail.
>  I read that it happened in v7.1.2 and I am currently using v7.3.2

This is *real* hard to believe.  Versions 7.2 and later have a unique
index on pg_shadow.usesysid.  Are you certain the server isn't 7.1 or
older?

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Duplicate user in pg_shadow
@ 2003-10-30 04:26  CHEWTC@ap.nec.com.sg
  0 siblings, 1 reply; 5+ messages in thread

From: CHEWTC@ap.nec.com.sg @ 2003-10-30 04:26 UTC (permalink / raw)
  To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-performance


Hi

I tried to delete the user from the pg_user but couldnt. This username is
being duplicated so we have the same 2 records.

What is the cause ? Is it due to memory or wrong configuration?

Thank you,
REgards.




                                                                                                                                        
                      Christopher                                                                                                       
                      Kings-Lynne               To:       CHEWTC@ap.nec.com.sg                                                          
                      <chriskl@familyhea        cc:       pgsql-performance@postgresql.org                                              
                      lth.com.au>               Subject:  Re: [PERFORM] Duplicate user in pg_shadow                                     
                                                                                                                                        
                      30/10/2003 12:24                                                                                                  
                      PM                                                                                                                
                                                                                                                                        
                                                                                                                                        




Maybe you could delete one of the users from the pg_shadow table, do the
dump and then after the dump is restored, recreate the dropped user (and
it will get a new sysid)

Chris


CHEWTC@ap.nec.com.sg wrote:

> Hi
>

>  When I do a SELECT * FROM pg_shadow, I can have more than one user with
the same id. This caused the pg_dump to
>  fail.

>

>  I read that it happened in v7.1.2 and I am currently using v7.3.2 on
Redhat v9.0
>

>  What can be the causes and how do we rectify it?

>

>
>
>
> Thank you,
> REgards.
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
>                http://archives.postgresql.org









^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: Duplicate user in pg_shadow
@ 2003-10-30 04:37  Christopher Kings-Lynne <chriskl@familyhealth.com.au>
  parent: CHEWTC@ap.nec.com.sg
  0 siblings, 0 replies; 5+ messages in thread

From: Christopher Kings-Lynne @ 2003-10-30 04:37 UTC (permalink / raw)
  To: CHEWTC@ap.nec.com.sg; +Cc: pgsql-performance


> I tried to delete the user from the pg_user but couldnt. This username is
> being duplicated so we have the same 2 records.
> 
> What is the cause ? Is it due to memory or wrong configuration?

Maybe it's an index corruption issue.

Try reindexing the pg_shadow table, based on the instructions here:

http://www.postgresql.org/docs/7.3/static/sql-reindex.html

Chris





^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~2003-10-30 04:37 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 04:14 Duplicate user in pg_shadow CHEWTC@ap.nec.com.sg
2003-10-30 04:24 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2003-10-30 04:26 ` Tom Lane <tgl@sss.pgh.pa.us>
2003-10-30 04:26 Re: Duplicate user in pg_shadow CHEWTC@ap.nec.com.sg
2003-10-30 04:37 ` Christopher Kings-Lynne <chriskl@familyhealth.com.au>

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