BUG #14009: pg_restore not restoring privilegs when one login/group role is missing

From: alexander(at)spiteri(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #14009: pg_restore not restoring privilegs when one login/group role is missing
Date: 2016-03-09 15:15:10
Message-ID: 20160309151510.8903.22052@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 14009
Logged by: Alexander Spiteri
Email address: alexander(at)spiteri(dot)org
PostgreSQL version: 9.5.1
Operating system: CentOS Linux release 7.2.1511 (Core)
Description:

I have just installed a new instance of postgres 9.5.1 and have an issue
with restoring the database, specifically privilges of the login/group
roles.

In the past I was working with postgres 8.4 and when I took a backup from
the live server to the testing server pg_restore would grant all privilages
to login/group roles which existed on the testing server and give an error
for those that do not exist.

On the new 9.5.1 server when I try to restore a database, if one login/group
role does not exist pg_restore gives an error about it and then does not
grant any rights to all the other login/group roles that do exist. No errors
/ notices are issued about the grants that are not applied.

This behaviour is puzzling. I expected to get errors for users that are not
found but why aren't privilges assigned to users that do exist?

I reproduced this behaviour on different installations running version 9.5.1
and 9.3.11.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2016-03-09 15:31:06 Re: gram.y comment issue
Previous Message Stepya 2016-03-09 13:39:03 BUG #14008: corr, covar_pop function returns different values on the same dataset