From: martin.klima@warhorsestudios.cz
To: pgsql-bugs@postgresql.org
Subject: BUG #13987: Refreshing materialized view prevents changing rights during restore
Date: Wed, 24 Feb 2016 16:36:56 +0000
Message-ID: <20160224163656.2568.64179@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
The following bug has been logged on the website:
Bug reference: 13987
Logged by: Martin Klima
Email address: martin.klima@warhorsestudios.cz
PostgreSQL version: 9.4.1
Operating system: Warhorse
Description:
I created dump of the database with pg_dump. When restoring it via psql, I
got the error "permission denied for relation ...". Upon checking the
problem, I realized that in the SQL file generated by the pg_dump, there is
command REFRESH MATERIALIZED VIEW ... just before the section (at the very
end of the dump) where the rights for the tables are first revoked and then
granted. The table mentioned in the error message is one of the tables the
materialized view is running.
My theory is that the refresh locks the table and therefore the REVOKE ALL
command fails. When I commented out the REFRESH MATERIALIZED VIEW commands,
the restore run without a problem (I then refreshed the views manually).
The command I run to create the dump was:
pg_dump -h<ip_address> -ntrunk -v -f d:\temp\dump.sql ConfigDB
>d:\temp\dump.log 2>&1
And restore with:
psql --single-transaction -h<ip_address> -f d:\temp\dump.sql ConfigDB
>out.log 2>error.log
Cheers,
Martin
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: martin.klima@warhorsestudios.cz
Subject: Re: BUG #13987: Refreshing materialized view prevents changing rights during restore
In-Reply-To: <20160224163656.2568.64179@wrigleys.postgresql.org>
References: <20160224163656.2568.64179@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox