Re: Remove superuser() checks from pgstattuple

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove superuser() checks from pgstattuple
Date: 2016-09-01 17:12:22
Message-ID: 6e01d90c-337f-fc02-2021-6520b4a099b9@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 8/23/16 5:22 PM, Stephen Frost wrote:
> Now that we track initial privileges on extension objects and changes to
> those permissions, we can drop the superuser() checks from the various
> functions which are part of the pgstattuple extension.
>
> Since a pg_upgrade will preserve the version of the extension which
> existed prior to the upgrade, we can't simply modify the existing
> functions but instead need to create new functions which remove the
> checks and update the SQL-level functions to use the new functions

I think this is a good change to pursue, and we'll likely want to do
more similar changes in contrib. But I'm worried that what is logically
a 10-line change will end up a 20 KiB patch every time.

Have we explored other options for addressing the upgrade problems?
Maybe the function could check that non-default privileges have been
granted?

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Anderson Carniel 2016-09-01 17:12:39 What is the posix_memalign() equivalent for the PostgreSQL?
Previous Message Fabrízio de Royes Mello 2016-09-01 17:06:01 Re: PostgreSQL 10 kick-off