Unix Technical Forum

Re: pg_dumpall problem - duplicated users

This is a discussion on Re: pg_dumpall problem - duplicated users within the pgsql Admins forums, part of the PostgreSQL category; --> Hi, i have similar problem - can't make dumps of any db with the same error message (and all ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Admins

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 05:12 AM
Bartek GRUbY
 
Posts: n/a
Default Re: pg_dumpall problem - duplicated users

Hi,
i have similar problem - can't make dumps of any db with the same error message (and all applications using this pg server works fine) . But in my case, i think, only user 'postgres' is duplicated:

template1=> select * from pg_catalog.pg_shadow where usename = 'postgres';
usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
----------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
postgres | 1 | t | t | t | | |
postgres | 1 | t | t | t | md5c084502ed11efa9d3d96d29717a5e555 | |
(2 rows)

template1=> select * from pg_namespace ;
nspname | nspowner | nspacl
------------+----------+--------
pg_catalog | 1 | {=U}
pg_toast | 1 | {=}
public | 1 | {=UC}
pg_temp_1 | 1 |
(4 rows)

And every change i made to user postgres has effect to the one with passwd set. I can delete only him too. Someone can help? Im running out of time so every advice will be appreciated. Maybe someone know how to delete whole pg_shadow table and create users on db with no users at all (cause pg_shadow will be empty .

Thanks for any (and quick help,
greetings,

Bartek

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 05:12 AM
Tom Lane
 
Posts: n/a
Default Re: pg_dumpall problem - duplicated users

"Bartek GRUbY" <grubby@epf.pl> writes:
> i have similar problem - can't make dumps of any db with the same error message (and all applications using this pg server works fine) . But in my case, i think, only user 'postgres' is duplicated:


> template1=> select * from pg_catalog.pg_shadow where usename = 'postgres';
> usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
> ----------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
> postgres | 1 | t | t | t | | |
> postgres | 1 | t | t | t | md5c084502ed11efa9d3d96d29717a5e555 | |
> (2 rows)


What PG version are you using exactly? Could we see the system columns
for those rows, ie,

select ctid,xmin,xmax,cmin,xmax,* from pg_shadow where usename = 'postgres';

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 05:12 AM
GRUbY
 
Posts: n/a
Default Re: pg_dumpall problem - duplicated users

Tom Lane napisał(a):

>"Bartek GRUbY" <grubby@epf.pl> writes:
>
>
>>i have similar problem - can't make dumps of any db with the same error message (and all applications using this pg server works fine) . But in my case, i think, only user 'postgres' is duplicated:
>>
>>

>
>
>
>>template1=> select * from pg_catalog.pg_shadow where usename = 'postgres';
>> usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig
>>----------+----------+-------------+----------+-----------+-------------------------------------+----------+-----------
>> postgres | 1 | t | t | t | | |
>> postgres | 1 | t | t | t | md5c084502ed11efa9d3d96d29717a5e555 | |
>>(2 rows)
>>
>>

>
>What PG version are you using exactly? Could we see the system columns
>for those rows, ie,
>
> select ctid,xmin,xmax,cmin,xmax,* from pg_shadow where usename = 'postgres';
>
> regards, tom lane
>
>

I'm using exactly PostgreSQL 7.3.9 on i686-pc-linux-gnu, compiled by
GCC gcc (GCC) 3.4.2 20041017 (Red Hat 3.4.2-6.fc3) :]

If it helps:

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)


If U have any ideas or more questions please write. Like I said, my
deadline is near :[ Now i'm thinking about writing a script to backup
all data and schemas from all dbs by myself and reinstallin PG... but it
is a lot of work and i cant check if i did everything right for sure

Greetings,
Bartek


---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 02:42 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com