From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Bill McGonigle <mcgonigle(at)medicalmedia(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dumpall storing multiple copies of DB's? |
Date: | 2002-02-27 05:08:01 |
Message-ID: | 19779.1014786481@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Bill McGonigle <mcgonigle(at)medicalmedia(dot)com> writes:
> Under what circumstances might pg_dumpall store several copies of the
> database? When I restore the database with psql < dumpfile I see 4-5
> occurances of each database. This is on 7.1.3.
pg_dumpall gets the list of databases to store using a query along the
lines of
SELECT ... FROM pg_database d LEFT JOIN pg_shadow u ON (datdba = usesysid)
If you happen to have multiple entries in pg_shadow with the same
usesysid, then the SELECT will generate multiple rows for the matching
databases.
7.2 has a unique index on pg_shadow.usesysid, so hopefully this failure
mode is a thing of the past now. In the meantime, get rid of the extra
pg_shadow entries and dump again.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-02-27 05:11:16 | Re: pg_dump gives segmentation fault and cores |
Previous Message | Adam | 2002-02-27 04:16:29 | Re: setting up a trace through extended stored procedures |