Skip to content

Commit fe3b5eb

Browse files
committed
REASSIGN OWNED: consider grants on tablespaces, too
Apparently this was considered in the original code (see commit cec3b0a) but I failed to notice that such entries would always be skipped by the database check at the start of the loop. Per bugs #7578 by Nikolay, #6116 by tushar.qa@gmail.com.
1 parent e1be1df commit fe3b5eb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/backend/catalog/pg_shdepend.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,8 +1217,12 @@ shdepDropOwned(List *roleids, DropBehavior behavior)
12171217
Form_pg_shdepend sdepForm = (Form_pg_shdepend) GETSTRUCT(tuple);
12181218
ObjectAddress obj;
12191219

1220-
/* We only operate on objects in the current database */
1221-
if (sdepForm->dbid != MyDatabaseId)
1220+
/*
1221+
* We only operate on shared objects and objects in the current
1222+
* database
1223+
*/
1224+
if (sdepForm->dbid != MyDatabaseId &&
1225+
sdepForm->dbid != InvalidOid)
12221226
continue;
12231227

12241228
switch (sdepForm->deptype)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy