From: | Michael Fuhr <mike(at)fuhr(dot)org> |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | pg_dump fails to set index ownership |
Date: | 2005-01-11 02:28:52 |
Message-ID: | 20050111022852.GA7955@winnie.fuhr.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
PostgreSQL 8.0.0rc4
pg_dump fails to set ownership on indexes. When a database superuser
restores a dump, indexes will be owned by the superuser instead of
by the table's owner. The table owner will then be unable to drop
or alter the index.
Here's how to reproduce:
createuser -Upostgres -PAD testuser
createdb -Upostgres test
psql -Utestuser test
CREATE TABLE foo (id serial PRIMARY KEY, name text);
CREATE INDEX foo_name_idx ON foo (name);
\q
pg_dump -Upostgres test > test.sql
dropdb -Upostgres test
createdb -Upostgres test
psql -Upostgres test < test.sql
psql -Utestuser test
\di
List of relations
Schema | Name | Type | Owner | Table
--------+--------------+-------+----------+-------
public | foo_name_idx | index | postgres | foo
public | foo_pkey | index | postgres | foo
(2 rows)
DROP index foo_name_idx;
ERROR: must be owner of relation foo_name_idx
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-01-11 03:43:17 | Re: pg_dump fails to set index ownership |
Previous Message | Ivan Chumak | 2005-01-10 15:31:53 | BUG #1380: dont reading messages in russian languages |