weird table doubling -- how to fix?

From: Frank Miles <fpm(at)u(dot)washington(dot)edu>
To: <pgsql-general(at)postgresql(dot)org>
Subject: weird table doubling -- how to fix?
Date: 2001-05-04 04:52:39
Message-ID: Pine.A41.4.33.0105032135420.9142-100000@mead5.u.washington.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Having just installed 7.1, I find that the psql commant '\dt' gives each table
twice; once with 'fpm' as the owner; then again with 'postgres' as the owner.
That would be annoying, though not (by itself) fatal, since SELECTs only seem
to return single rows of data. Unfortunately (wanting to clarify the problem)
I ran a pg_dump on one of the databases. The response was:

getDatabase(): SELECT failed. Explanation from backend: 'ERROR: More than one tuple returned by a subselect used as an expression.

My suspicion is that when I did the pg_dump_all to save the original DB contents,
I did this as 'fpm' (this was from 7.0.3). When I restored the DBs, I did it
as 'postgres', because even if I 'createuser fpm', it won't allow 'fpm' to use
pg_ctl to restore the dump. Somehow, the tables have two separate names associated;
their original creator/dumper (fpm) and their restorer (postgres).

Vacuuming the database loaded by user postgres does no good.

Whether my suspicion is baseless or not, can anyone recommend how I might
restore things? If my suspicion is valid, then please add some text
(perhaps as simple as "as user postgres") in step 2 of the INSTALL
documentation.

Thanks for all your help!

-frank

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-05-04 05:28:47 Re: weird table doubling -- how to fix?
Previous Message Tom Lane 2001-05-04 04:47:52 Re: RE: Can't get Postgres to use indices