From: | Romain Roure <romain(dot)roure(at)persee(dot)fr> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Duplicate public schema and user tables |
Date: | 2007-09-26 08:51:43 |
Message-ID: | 46FA1D9F.5050604@persee.fr |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi,
We suddenly stumbled upon duplicate entities. Some of our databases
ended up with two 'public' schemas and several duplicate user tables
(sharing the same oid).
After checking through the logs, it doesn't appear to be a problem
resulting from wrap-around OID's. Though the logs mention
transaction-wraparound may have happened.
For the moment, we are trying to get ride of the duplicates and can't
manage to pull that off. We tried restarting the server in singe-user
mode with -P option to reindex the database, but it failed complaining
about the uniqueness of the index in 'pg_class'.
We're running PostgreSQL 8.0.1. Any help would be appreciated.
Regards,
Romain
The two public schemas :
bddreco=# SELECT *,oid from pg_namespace ;
nspname | nspowner | nspacl |
oid
--------------------+----------+-------------------------------------+----------
pg_toast | 1 | |
99
pg_temp_1 | 1 | |
16847
pg_catalog | 1 | {postgres=UC/postgres,=U/postgres} |
11
public | 1 | {postgres=UC/postgres,=UC/postgres} |
2200
information_schema | 1 | {postgres=UC/postgres,=U/postgres} |
17057
public | 1 | {postgres=UC/postgres,=UC/postgres} |
73794132
(6 rows)
Duplicate user table :
bddreco=# SELECT *,oid from pg_class where relname='series';
relname | relnamespace | reltype | relowner | relam | relfilenode |
reltablespace | relpages | reltuples | reltoastrelid | reltoastidxid |
relhasindex | relisshared | relkind | relnatts | relchecks | reltriggers
| relukeys | relfkeys | relrefs | relhasoids | relhaspkey | relhasrules
| relhassubclass | relacl
| oid
series | 73794132 | 73794327 | 102 | 0 | 73794326 |
0 | 0 | 0 | 0 | 0 | t
| f | r | 4 | 0 | 5
| 0 | 0 | 0 | t | t | f
| f |
{granitadmin=arwdRxt/granitadmin,granitguest=r/granitadmin,granitserie=arwd/granitadmin}
| 73794326
series | 73794132 | 73794327 | 102 | 0 | 73794326 |
0 | 0 | 0 | 0 | 0 | t
| f | r | 4 | 0 | 5
| 0 | 0 | 0 | t | t | f
| f |
{granitadmin=arwdRxt/granitadmin,granitguest=r/granitadmin,granitserie=arwd/granitadmin}
| 73794326
series | 73794132 | 73794327 | 102 | 0 | 73794326 |
0 | 0 | 0 | 0 | 0 | t
| f | r | 4 | 0 | 5
| 0 | 0 | 0 | t | t | f
| f |
{granitadmin=arwdRxt/granitadmin,granitguest=r/granitadmin,granitserie=arwd/granitadmin}
| 73794326
series | 73794132 | 73794327 | 102 | 0 | 73794326 |
0 | 1 | 1 | 0 | 0 | t
| f | r | 4 | 0 | 5
| 0 | 0 | 0 | t | t | f
| f |
{granitadmin=arwdRxt/granitadmin,granitguest=r/granitadmin,granitserie=arwd/granitadmin}
| 73794326
(4 rows)
From | Date | Subject | |
---|---|---|---|
Next Message | hubert depesz lubaczewski | 2007-09-26 08:53:11 | 8.3devel, csvlog, missing info? |
Previous Message | Bruce Momjian | 2007-09-26 08:45:54 | Re: PQntuples return type |