Re: Drop user y Grantor <> Owner !

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Stephen Amell <StephenAmell(at)inbox(dot)lv>
Cc: "pos >> pgsql-es-ayuda(at)lists(dot)postgresql(dot)org" <pgsql-es-ayuda(at)lists(dot)postgresql(dot)org>
Subject: Re: Drop user y Grantor <> Owner !
Date: 2017-12-20 14:22:52
Message-ID: 20171220142252.3hh2r22yrrhxhxnc@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

Alvaro Herrera escribió:

> No recuerdo por qué razon cuando inventé REASSIGN OWNED hice que no
> cambiara los ACL directamente y le pasé esa responsabilidad a DROP
> OWNED. El manual dice explícitamente:
> The REASSIGN OWNED command does not affect any privileges granted to the
> old_roles for objects that are not owned by them. Use DROP OWNED to
> revoke such privileges.
> https://www.postgresql.org/docs/10/static/sql-reassign-owned.html
>
> Lo que sí sé es que ALTER DEFAULT PRIVILEGES se inventó después
> de ambos. Quizás esto deba considerarse un bug que debamos corregir,
> pero dado lo que cito arriba, quizás causaría una inconsistencia mayor.

Después de pensarlo un poco más, creo que derechamente es un bug el que
REASSIGN OWNED no cambie el grantor de un objeto (el default ACL) que se
perdería con DROP OWNED. ¿Escribes un patch para corregir esto?
Debería ser en el caso DefaultAclRelationId en el switch en la función
shdepReassignOwned, archivo src/backend/catalog/pg_shdepend.c.

saludos

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Anthony Sotolongo 2017-12-20 15:03:39 Re: Pregunta tonta.
Previous Message Alvaro Herrera 2017-12-20 11:35:02 Re: Drop user y Grantor <> Owner !