Re: pg_dumpall storing multiple copies of DB's?
| От | Tom Lane |
|---|---|
| Тема | Re: pg_dumpall storing multiple copies of DB's? |
| Дата | |
| Msg-id | 19779.1014786481@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | pg_dumpall storing multiple copies of DB's? (Bill McGonigle <mcgonigle@medicalmedia.com>) |
| Ответы |
Re: pg_dumpall storing multiple copies of DB's?
|
| Список | pgsql-general |
Bill McGonigle <mcgonigle@medicalmedia.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
В списке pgsql-general по дате отправления: