pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
9+ messages / 3 participants
[nested] [flat]
Commits from this thread:
2015-12-21 ab14c13838 2c8ae6442f 62e6eba8d2 7af3dd540e adjust ACL owners for REASSIGN and ALTER OWNER TO
* BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
@ 2015-10-07 14:25 cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 1 reply; 9+ messages in thread
From: cpacejo@clearskydata.com @ 2015-10-07 14:25 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 13666
Logged by: Chris Pacejo
Email address: cpacejo@clearskydata.com
PostgreSQL version: 9.4.4
Operating system: CentOS 7 (kernel 3.10.0-123.el7.x86_64)
Description:
=# CREATE TYPE foo AS (a integer, b integer);
=# ALTER TYPE foo OWNER TO user1;
=# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
relfilenode WHERE typname = 'foo';
-[ RECORD 1 ]---
typowner | 16384
relowner | 16384
=# REASSIGN OWNED BY user1 TO user2;
=# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
relfilenode WHERE typname = 'foo';
-[ RECORD 1 ]---
typowner | 8713825
relowner | 16384
This prevents user2 from being able to modify 'foo':
=> ALTER TYPE foo RENAME ATTRIBUTE b TO c;
ERROR: must be owner of relation foo
Furthermore, while trying to replicate in another database, I encountered:
=# REASSIGN OWNED BY user1 TO user2;
ERROR: unexpected classid 1418
Not sure if this is related or not.
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
@ 2015-10-07 17:01 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 21:54 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 2 replies; 9+ messages in thread
From: Alvaro Herrera @ 2015-10-07 17:01 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs
cpacejo@clearskydata.com wrote:
> =# CREATE TYPE foo AS (a integer, b integer);
>
> =# ALTER TYPE foo OWNER TO user1;
>
> =# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
> relfilenode WHERE typname = 'foo';
> -[ RECORD 1 ]---
> typowner | 16384
> relowner | 16384
>
> =# REASSIGN OWNED BY user1 TO user2;
>
> =# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
> relfilenode WHERE typname = 'foo';
> -[ RECORD 1 ]---
> typowner | 8713825
> relowner | 16384
Hmm. I guess we're missing a recursion step somewhere. I would have
assumed that the pg_class entry would also have a dependency on the
owner and should would have been visited in the initial loop. Strange.
> Furthermore, while trying to replicate in another database, I encountered:
>
> =# REASSIGN OWNED BY user1 TO user2;
> ERROR: unexpected classid 1418
>
> Not sure if this is related or not.
Not related. 1418 is pg_user_mapping (FDW stuff). Not sure what should
happen here; my inclination without thinking too hard is that REASSIGN
OWNED should ignore that object and DROP OWNED should remove it.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-11 21:54 ` Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 0 replies; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-11 21:54 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs
Alvaro Herrera wrote:
> cpacejo@clearskydata.com wrote:
> > Furthermore, while trying to replicate in another database, I encountered:
> >
> > =# REASSIGN OWNED BY user1 TO user2;
> > ERROR: unexpected classid 1418
> >
> > Not sure if this is related or not.
>
> Not related. 1418 is pg_user_mapping (FDW stuff). Not sure what should
> happen here; my inclination without thinking too hard is that REASSIGN
> OWNED should ignore that object and DROP OWNED should remove it.
Ouch, I just noticed that you had already reported this months ago, and
I was even aware of it! I just pushed a fix for it without mentioning
you as first reporter :-(
I'm now looking at the other problem you reported here.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-11 22:30 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 1 reply; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-11 22:30 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs
Alvaro Herrera wrote:
> cpacejo@clearskydata.com wrote:
> > =# REASSIGN OWNED BY user1 TO user2;
> >
> > =# SELECT typowner, relowner FROM pg_type JOIN pg_class ON typrelid =
> > relfilenode WHERE typname = 'foo';
> > -[ RECORD 1 ]---
> > typowner | 8713825
> > relowner | 16384
>
> Hmm. I guess we're missing a recursion step somewhere. I would have
> assumed that the pg_class entry would also have a dependency on the
> owner and should would have been visited in the initial loop. Strange.
I think I see what's going on here: in AlterTypeOwner the code calls
ATExecChangeOwner when it detects a composite type to start the
modification starting from the type relation's, from where it cascades
onto the type itself. However, AlterTypeOwnerInternal hasn't heard of
this trick and just changes itself and the array entry, so the pg_class
entry is not modified.
I think the bug is that shdepReassignOwned shouldn't be calling
AlterTypeOwnerInternal directly, because that routine is not of a high
enough level. We need another routine sitting between AlterTypeOwner
and AlterTypeOwnerInternal which does the real work for the former
(including calling ATExecChangeOwner for composites), after looking up
the type OID from the name list; then shdepReassignOwned should call
that new intermediate function.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-15 23:46 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-16 23:15 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 1 reply; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-15 23:46 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kouhei Kaigai <kaigai@ak.jp.nec.com>
Alvaro Herrera wrote:
> I think the bug is that shdepReassignOwned shouldn't be calling
> AlterTypeOwnerInternal directly, because that routine is not of a high
> enough level. We need another routine sitting between AlterTypeOwner
> and AlterTypeOwnerInternal which does the real work for the former
> (including calling ATExecChangeOwner for composites), after looking up
> the type OID from the name list; then shdepReassignOwned should call
> that new intermediate function.
I think that code is a bit confused. In the attached patch I renamed
AlterTypeOwnerInternal to AlterTypeOwnerBare, and created a new
AlterTypeOwnerInternal which either calls ATExecChangeOwner (if
composite) of AlterTypeOwnerBare (if not); then, on ATExecChangeOwner we
can call *Bare if necessary, and on REASSIGN OWNED (shdepReassignOwned)
we can call AlterTypeOwnerInternal which now behaves correctly in the
case of a composite type. There's some duplicate code that was
previously part of AlterTypeOwner directly; that's now calling
AlterTypeOwnerInternal instead.
There's an imcomplete comment above AlterTypeOwnerInternal related to a
function parameter that doesn't exist, introduced by 05f3f9c7b292; I
think this was supposed to control whether object access hooks are
called or not. I wonder if we need to fix that -- this patch simply
removes the comment. Cc'ing KaiGai and Robert about that.
(There's some inefficiency now that wasn't previously in that we open
pg_type repeatedly in ALTER TYPE OWNER, but I don't think we care about
that.)
This has been wrong all along; I wonder how come we hadn't gotten any
reports about this. That said, the test coverage for REASSIGN OWNED
leaves something to be desired. This patch adds a composite type to
that, but there's a lot more object types that would be worth covering.
(Note the supplied test case uses a "regrole" cast, so it's not
appropriate to apply that to 9.4 and earlier.)
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
reassign-composites.patch (text/x-diff, 9.2K) download
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index d61b583..045ed3f 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9057,8 +9057,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
* Also change the ownership of the table's row type, if it has one
*/
if (tuple_class->relkind != RELKIND_INDEX)
- AlterTypeOwnerInternal(tuple_class->reltype, newOwnerId,
- tuple_class->relkind == RELKIND_COMPOSITE_TYPE);
+ AlterTypeOwnerBare(tuple_class->reltype, newOwnerId);
/*
* If we are operating on a table or materialized view, also change
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index de91353..6d22fdf 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -3272,57 +3272,7 @@ AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
get_namespace_name(typTup->typnamespace));
}
- /*
- * If it's a composite type, invoke ATExecChangeOwner so that we fix
- * up the pg_class entry properly. That will call back to
- * AlterTypeOwnerInternal to take care of the pg_type entry(s).
- */
- if (typTup->typtype == TYPTYPE_COMPOSITE)
- ATExecChangeOwner(typTup->typrelid, newOwnerId, true, AccessExclusiveLock);
- else
- {
- Datum repl_val[Natts_pg_type];
- bool repl_null[Natts_pg_type];
- bool repl_repl[Natts_pg_type];
- Acl *newAcl;
- Datum aclDatum;
- bool isNull;
-
- memset(repl_null, false, sizeof(repl_null));
- memset(repl_repl, false, sizeof(repl_repl));
-
- repl_repl[Anum_pg_type_typowner - 1] = true;
- repl_val[Anum_pg_type_typowner - 1] = ObjectIdGetDatum(newOwnerId);
-
- aclDatum = heap_getattr(tup,
- Anum_pg_type_typacl,
- RelationGetDescr(rel),
- &isNull);
- /* Null ACLs do not require changes */
- if (!isNull)
- {
- newAcl = aclnewowner(DatumGetAclP(aclDatum),
- typTup->typowner, newOwnerId);
- repl_repl[Anum_pg_type_typacl - 1] = true;
- repl_val[Anum_pg_type_typacl - 1] = PointerGetDatum(newAcl);
- }
-
- tup = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val, repl_null,
- repl_repl);
-
- simple_heap_update(rel, &tup->t_self, tup);
-
- CatalogUpdateIndexes(rel, tup);
-
- /* Update owner dependency reference */
- changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
-
- InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
-
- /* If it has an array type, update that too */
- if (OidIsValid(typTup->typarray))
- AlterTypeOwnerInternal(typTup->typarray, newOwnerId, false);
- }
+ AlterTypeOwnerInternal(typeOid, newOwnerId, true);
}
ObjectAddressSet(address, TypeRelationId, typeOid);
@@ -3336,15 +3286,13 @@ AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
/*
* AlterTypeOwnerInternal - change type owner unconditionally
*
- * This is currently only used to propagate ALTER TABLE/TYPE OWNER to a
- * table's rowtype or an array type, and to implement REASSIGN OWNED BY.
- * It assumes the caller has done all needed checks. The function will
- * automatically recurse to an array type if the type has one.
+ * This function recurses to handle a pg_class entry, if necessary. It
+ * invokes any necessary access object hooks. If hasDependEntry is TRUE, this
+ * function modifies the pg_shdepend entry appropriately (this should be
+ * passed as FALSE only for table rowtypes and array types).
*
- * hasDependEntry should be TRUE if type is expected to have a pg_shdepend
- * entry (ie, it's not a table rowtype nor an array type).
- * is_primary_ops should be TRUE if this function is invoked with user's
- * direct operation (e.g, shdepReassignOwned). Elsewhere,
+ * This is used by ALTER TABLE/TYPE OWNER commands, as well as by REASSIGN
+ * OWNED BY. It assumes the caller has done all needed check.
*/
void
AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
@@ -3353,6 +3301,46 @@ AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
Relation rel;
HeapTuple tup;
Form_pg_type typTup;
+
+ rel = heap_open(TypeRelationId, RowExclusiveLock);
+
+ tup = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typeOid));
+ if (!HeapTupleIsValid(tup))
+ elog(ERROR, "cache lookup failed for type %u", typeOid);
+ typTup = (Form_pg_type) GETSTRUCT(tup);
+
+ /*
+ * If it's a composite type, invoke ATExecChangeOwner so that we fix up the
+ * pg_class entry properly. That will call back to AlterTypeOwnerBare to
+ * take care of the pg_type entry(s).
+ */
+ if (typTup->typtype == TYPTYPE_COMPOSITE)
+ ATExecChangeOwner(typTup->typrelid, newOwnerId, true, AccessExclusiveLock);
+ else
+ AlterTypeOwnerBare(typeOid, newOwnerId);
+
+ /* Update owner dependency reference */
+ if (hasDependEntry)
+ changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
+
+ InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
+
+ ReleaseSysCache(tup);
+ heap_close(rel, RowExclusiveLock);
+}
+
+/*
+ * AlterTypeOwnerBare - bare-bones type owner change.
+ *
+ * This routine simply modifies the owner of a pg_type entry, and recurses
+ * to handle a possible array type.
+ */
+void
+AlterTypeOwnerBare(Oid typeOid, Oid newOwnerId)
+{
+ Relation rel;
+ HeapTuple tup;
+ Form_pg_type typTup;
Datum repl_val[Natts_pg_type];
bool repl_null[Natts_pg_type];
bool repl_repl[Natts_pg_type];
@@ -3393,15 +3381,9 @@ AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
CatalogUpdateIndexes(rel, tup);
- /* Update owner dependency reference, if it has one */
- if (hasDependEntry)
- changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
-
/* If it has an array type, update that too */
if (OidIsValid(typTup->typarray))
- AlterTypeOwnerInternal(typTup->typarray, newOwnerId, false);
-
- InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
+ AlterTypeOwnerBare(typTup->typarray, newOwnerId);
/* Clean up */
heap_close(rel, RowExclusiveLock);
diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h
index ef4b41b..eda8898 100644
--- a/src/include/commands/typecmds.h
+++ b/src/include/commands/typecmds.h
@@ -41,9 +41,11 @@ extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrNa
extern void checkDomainOwner(HeapTuple tup);
extern ObjectAddress RenameType(RenameStmt *stmt);
+
extern ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype);
-extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
- bool hasDependEntry);
+extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId, bool hasDependEntry);
+extern void AlterTypeOwnerBare(Oid typeOid, Oid newOwnerId);
+
extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
ObjectType objecttype, Oid *oldschema);
extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved);
diff --git a/src/test/regress/expected/dependency.out b/src/test/regress/expected/dependency.out
index 09b0212..e18230b 100644
--- a/src/test/regress/expected/dependency.out
+++ b/src/test/regress/expected/dependency.out
@@ -91,6 +91,18 @@ CREATE TABLE deptest2 (f1 int);
CREATE SEQUENCE ss1;
ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1');
ALTER SEQUENCE ss1 OWNED BY deptest2.f1;
+-- When reassigning ownership of a composite type, its pg_class entry
+-- should match
+CREATE TYPE deptest_t AS (a int);
+-- throw in an enum for good measure
+CREATE TYPE deptest_enum AS ENUM ('red');
+SELECT typowner = relowner, typowner::regrole
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+ ?column? | typowner
+----------+------------------
+ t | regression_user1
+(1 row)
+
RESET SESSION AUTHORIZATION;
REASSIGN OWNED BY regression_user1 TO regression_user2;
\dt deptest
@@ -100,6 +112,13 @@ REASSIGN OWNED BY regression_user1 TO regression_user2;
public | deptest | table | regression_user2
(1 row)
+SELECT typowner = relowner, typowner::regrole
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+ ?column? | typowner
+----------+------------------
+ t | regression_user2
+(1 row)
+
-- doesn't work: grant still exists
DROP USER regression_user1;
ERROR: role "regression_user1" cannot be dropped because some objects depend on it
diff --git a/src/test/regress/sql/dependency.sql b/src/test/regress/sql/dependency.sql
index c1d8156..1552bd4 100644
--- a/src/test/regress/sql/dependency.sql
+++ b/src/test/regress/sql/dependency.sql
@@ -83,11 +83,22 @@ CREATE TABLE deptest2 (f1 int);
CREATE SEQUENCE ss1;
ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1');
ALTER SEQUENCE ss1 OWNED BY deptest2.f1;
-RESET SESSION AUTHORIZATION;
+-- When reassigning ownership of a composite type, its pg_class entry
+-- should match
+CREATE TYPE deptest_t AS (a int);
+-- throw in an enum for good measure
+CREATE TYPE deptest_enum AS ENUM ('red');
+SELECT typowner = relowner, typowner::regrole
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+
+RESET SESSION AUTHORIZATION;
REASSIGN OWNED BY regression_user1 TO regression_user2;
\dt deptest
+SELECT typowner = relowner, typowner::regrole
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+
-- doesn't work: grant still exists
DROP USER regression_user1;
DROP OWNED BY regression_user1;
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-16 23:15 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-17 17:29 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-21 23:27 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
0 siblings, 2 replies; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-16 23:15 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kouhei Kaigai <kaigai@ak.jp.nec.com>
Here's the final patch.
The commit msg says backpatched to 9.1, but given lack of backpatch of
another bugfix (commit 59367fdf9 for bug #9923) it doesn't actually
apply. I'd rather backpatch that fix and then apply this one.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
0001-Rework-internals-of-changing-a-type-s-ownership.patch (text/x-diff, 12.7K) download
From 23f4c028c519dd90a631545a8ae8e5af40f09821 Mon Sep 17 00:00:00 2001
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: Wed, 16 Dec 2015 19:08:23 -0300
Subject: [PATCH] Rework internals of changing a type's ownership
This is necessary so that REASSIGN OWNED does the right thing with
composite types, to wit, that it also alters ownership of the type's
pg_class entry -- previously, the pg_class entry remained owned by the
original user, which caused later other failures such as the new owner's
inability to use ALTER TYPE to rename an attribute of the affected
composite. Also, if the original owner is later dropped, the pg_class
entry becomes owned by a non-existant user which is bogus.
To fix, create a new routine AlterTypeOwner_oid which knows whether to
pass the request to ATExecChangeOwner or deal with it directly, and use
that in shdepReassignOwner rather than calling AlterTypeOwnerInternal
directly. AlterTypeOwnerInternal is now simpler in that it only
modifies the pg_type entry and recurses to handle a possible array type;
higher-level tasks are handled by either AlterTypeOwner directly or
AlterTypeOwner_oid.
I took the opportunity to add a few more objects to the test rig for
REASSIGN OWNED, so that more cases are exercised. Additional ones could
be added for superuser-only-ownable objects (such as FDWs and event
triggers) but I didn't want to push my luck with adding a new superuser
to the tests on a backpatchable bug fix.
Per bug #13666 reported by Chris Pacejo.
Backpatched to 9.1.
---
src/backend/catalog/pg_shdepend.c | 2 +-
src/backend/commands/tablecmds.c | 3 +-
src/backend/commands/typecmds.c | 119 +++++++++++++------------------
src/include/commands/typecmds.h | 6 +-
src/test/regress/expected/dependency.out | 29 +++++++-
src/test/regress/sql/dependency.sql | 19 ++++-
6 files changed, 102 insertions(+), 76 deletions(-)
diff --git a/src/backend/catalog/pg_shdepend.c b/src/backend/catalog/pg_shdepend.c
index cfd43a8..c3cce67 100644
--- a/src/backend/catalog/pg_shdepend.c
+++ b/src/backend/catalog/pg_shdepend.c
@@ -1365,7 +1365,7 @@ shdepReassignOwned(List *roleids, Oid newrole)
switch (sdepForm->classid)
{
case TypeRelationId:
- AlterTypeOwnerInternal(sdepForm->objid, newrole, true);
+ AlterTypeOwner_oid(sdepForm->objid, newrole, true);
break;
case NamespaceRelationId:
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index d61b583..8186ed2 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -9057,8 +9057,7 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing, LOCKMODE lock
* Also change the ownership of the table's row type, if it has one
*/
if (tuple_class->relkind != RELKIND_INDEX)
- AlterTypeOwnerInternal(tuple_class->reltype, newOwnerId,
- tuple_class->relkind == RELKIND_COMPOSITE_TYPE);
+ AlterTypeOwnerInternal(tuple_class->reltype, newOwnerId);
/*
* If we are operating on a table or materialized view, also change
diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c
index de91353..f5e25ef 100644
--- a/src/backend/commands/typecmds.c
+++ b/src/backend/commands/typecmds.c
@@ -3272,57 +3272,7 @@ AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
get_namespace_name(typTup->typnamespace));
}
- /*
- * If it's a composite type, invoke ATExecChangeOwner so that we fix
- * up the pg_class entry properly. That will call back to
- * AlterTypeOwnerInternal to take care of the pg_type entry(s).
- */
- if (typTup->typtype == TYPTYPE_COMPOSITE)
- ATExecChangeOwner(typTup->typrelid, newOwnerId, true, AccessExclusiveLock);
- else
- {
- Datum repl_val[Natts_pg_type];
- bool repl_null[Natts_pg_type];
- bool repl_repl[Natts_pg_type];
- Acl *newAcl;
- Datum aclDatum;
- bool isNull;
-
- memset(repl_null, false, sizeof(repl_null));
- memset(repl_repl, false, sizeof(repl_repl));
-
- repl_repl[Anum_pg_type_typowner - 1] = true;
- repl_val[Anum_pg_type_typowner - 1] = ObjectIdGetDatum(newOwnerId);
-
- aclDatum = heap_getattr(tup,
- Anum_pg_type_typacl,
- RelationGetDescr(rel),
- &isNull);
- /* Null ACLs do not require changes */
- if (!isNull)
- {
- newAcl = aclnewowner(DatumGetAclP(aclDatum),
- typTup->typowner, newOwnerId);
- repl_repl[Anum_pg_type_typacl - 1] = true;
- repl_val[Anum_pg_type_typacl - 1] = PointerGetDatum(newAcl);
- }
-
- tup = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val, repl_null,
- repl_repl);
-
- simple_heap_update(rel, &tup->t_self, tup);
-
- CatalogUpdateIndexes(rel, tup);
-
- /* Update owner dependency reference */
- changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
-
- InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
-
- /* If it has an array type, update that too */
- if (OidIsValid(typTup->typarray))
- AlterTypeOwnerInternal(typTup->typarray, newOwnerId, false);
- }
+ AlterTypeOwner_oid(typeOid, newOwnerId, true);
}
ObjectAddressSet(address, TypeRelationId, typeOid);
@@ -3334,21 +3284,58 @@ AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype)
}
/*
- * AlterTypeOwnerInternal - change type owner unconditionally
+ * AlterTypeOwner_oid - change type owner unconditionally
*
- * This is currently only used to propagate ALTER TABLE/TYPE OWNER to a
- * table's rowtype or an array type, and to implement REASSIGN OWNED BY.
- * It assumes the caller has done all needed checks. The function will
- * automatically recurse to an array type if the type has one.
+ * This function recurses to handle a pg_class entry, if necessary. It
+ * invokes any necessary access object hooks. If hasDependEntry is TRUE, this
+ * function modifies the pg_shdepend entry appropriately (this should be
+ * passed as FALSE only for table rowtypes and array types).
*
- * hasDependEntry should be TRUE if type is expected to have a pg_shdepend
- * entry (ie, it's not a table rowtype nor an array type).
- * is_primary_ops should be TRUE if this function is invoked with user's
- * direct operation (e.g, shdepReassignOwned). Elsewhere,
+ * This is used by ALTER TABLE/TYPE OWNER commands, as well as by REASSIGN
+ * OWNED BY. It assumes the caller has done all needed check.
*/
void
-AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
- bool hasDependEntry)
+AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry)
+{
+ Relation rel;
+ HeapTuple tup;
+ Form_pg_type typTup;
+
+ rel = heap_open(TypeRelationId, RowExclusiveLock);
+
+ tup = SearchSysCache1(TYPEOID, ObjectIdGetDatum(typeOid));
+ if (!HeapTupleIsValid(tup))
+ elog(ERROR, "cache lookup failed for type %u", typeOid);
+ typTup = (Form_pg_type) GETSTRUCT(tup);
+
+ /*
+ * If it's a composite type, invoke ATExecChangeOwner so that we fix up the
+ * pg_class entry properly. That will call back to AlterTypeOwnerInternal
+ * to take care of the pg_type entry(s).
+ */
+ if (typTup->typtype == TYPTYPE_COMPOSITE)
+ ATExecChangeOwner(typTup->typrelid, newOwnerId, true, AccessExclusiveLock);
+ else
+ AlterTypeOwnerInternal(typeOid, newOwnerId);
+
+ /* Update owner dependency reference */
+ if (hasDependEntry)
+ changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
+
+ InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
+
+ ReleaseSysCache(tup);
+ heap_close(rel, RowExclusiveLock);
+}
+
+/*
+ * AlterTypeOwnerInternal - bare-bones type owner change.
+ *
+ * This routine simply modifies the owner of a pg_type entry, and recurses
+ * to handle a possible array type.
+ */
+void
+AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId)
{
Relation rel;
HeapTuple tup;
@@ -3393,15 +3380,9 @@ AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
CatalogUpdateIndexes(rel, tup);
- /* Update owner dependency reference, if it has one */
- if (hasDependEntry)
- changeDependencyOnOwner(TypeRelationId, typeOid, newOwnerId);
-
/* If it has an array type, update that too */
if (OidIsValid(typTup->typarray))
- AlterTypeOwnerInternal(typTup->typarray, newOwnerId, false);
-
- InvokeObjectPostAlterHook(TypeRelationId, typeOid, 0);
+ AlterTypeOwnerInternal(typTup->typarray, newOwnerId);
/* Clean up */
heap_close(rel, RowExclusiveLock);
diff --git a/src/include/commands/typecmds.h b/src/include/commands/typecmds.h
index ef4b41b..44bc5e7 100644
--- a/src/include/commands/typecmds.h
+++ b/src/include/commands/typecmds.h
@@ -41,9 +41,11 @@ extern ObjectAddress AlterDomainDropConstraint(List *names, const char *constrNa
extern void checkDomainOwner(HeapTuple tup);
extern ObjectAddress RenameType(RenameStmt *stmt);
+
extern ObjectAddress AlterTypeOwner(List *names, Oid newOwnerId, ObjectType objecttype);
-extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId,
- bool hasDependEntry);
+extern void AlterTypeOwner_oid(Oid typeOid, Oid newOwnerId, bool hasDependEntry);
+extern void AlterTypeOwnerInternal(Oid typeOid, Oid newOwnerId);
+
extern ObjectAddress AlterTypeNamespace(List *names, const char *newschema,
ObjectType objecttype, Oid *oldschema);
extern Oid AlterTypeNamespace_oid(Oid typeOid, Oid nspOid, ObjectAddresses *objsMoved);
diff --git a/src/test/regress/expected/dependency.out b/src/test/regress/expected/dependency.out
index 09b0212..caba88f 100644
--- a/src/test/regress/expected/dependency.out
+++ b/src/test/regress/expected/dependency.out
@@ -84,13 +84,31 @@ DROP OWNED BY regression_user1;
\d deptest
-- Test REASSIGN OWNED
GRANT ALL ON deptest1 TO regression_user1;
+GRANT CREATE ON DATABASE regression TO regression_user1;
SET SESSION AUTHORIZATION regression_user1;
+CREATE SCHEMA deptest;
CREATE TABLE deptest (a serial primary key, b text);
+ALTER DEFAULT PRIVILEGES FOR ROLE regression_user1 IN SCHEMA deptest
+ GRANT ALL ON TABLES TO regression_user2;
+CREATE FUNCTION deptest_func() RETURNS void LANGUAGE plpgsql
+ AS $$ BEGIN END; $$;
+CREATE TYPE deptest_enum AS ENUM ('red');
+CREATE TYPE deptest_range AS RANGE (SUBTYPE = int4);
CREATE TABLE deptest2 (f1 int);
-- make a serial column the hard way
CREATE SEQUENCE ss1;
ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1');
ALTER SEQUENCE ss1 OWNED BY deptest2.f1;
+-- When reassigning ownership of a composite type, its pg_class entry
+-- should match
+CREATE TYPE deptest_t AS (a int);
+SELECT typowner = relowner
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+ ?column?
+----------
+ t
+(1 row)
+
RESET SESSION AUTHORIZATION;
REASSIGN OWNED BY regression_user1 TO regression_user2;
\dt deptest
@@ -100,10 +118,19 @@ REASSIGN OWNED BY regression_user1 TO regression_user2;
public | deptest | table | regression_user2
(1 row)
+SELECT typowner = relowner
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+ ?column?
+----------
+ t
+(1 row)
+
-- doesn't work: grant still exists
DROP USER regression_user1;
ERROR: role "regression_user1" cannot be dropped because some objects depend on it
-DETAIL: privileges for table deptest1
+DETAIL: owner of default privileges on new relations belonging to role regression_user1 in schema deptest
+privileges for database regression
+privileges for table deptest1
DROP OWNED BY regression_user1;
DROP USER regression_user1;
\set VERBOSITY terse
diff --git a/src/test/regress/sql/dependency.sql b/src/test/regress/sql/dependency.sql
index c1d8156..599a359 100644
--- a/src/test/regress/sql/dependency.sql
+++ b/src/test/regress/sql/dependency.sql
@@ -74,20 +74,37 @@ DROP OWNED BY regression_user1;
-- Test REASSIGN OWNED
GRANT ALL ON deptest1 TO regression_user1;
+GRANT CREATE ON DATABASE regression TO regression_user1;
SET SESSION AUTHORIZATION regression_user1;
+CREATE SCHEMA deptest;
CREATE TABLE deptest (a serial primary key, b text);
+ALTER DEFAULT PRIVILEGES FOR ROLE regression_user1 IN SCHEMA deptest
+ GRANT ALL ON TABLES TO regression_user2;
+CREATE FUNCTION deptest_func() RETURNS void LANGUAGE plpgsql
+ AS $$ BEGIN END; $$;
+CREATE TYPE deptest_enum AS ENUM ('red');
+CREATE TYPE deptest_range AS RANGE (SUBTYPE = int4);
CREATE TABLE deptest2 (f1 int);
-- make a serial column the hard way
CREATE SEQUENCE ss1;
ALTER TABLE deptest2 ALTER f1 SET DEFAULT nextval('ss1');
ALTER SEQUENCE ss1 OWNED BY deptest2.f1;
-RESET SESSION AUTHORIZATION;
+-- When reassigning ownership of a composite type, its pg_class entry
+-- should match
+CREATE TYPE deptest_t AS (a int);
+SELECT typowner = relowner
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+
+RESET SESSION AUTHORIZATION;
REASSIGN OWNED BY regression_user1 TO regression_user2;
\dt deptest
+SELECT typowner = relowner
+FROM pg_type JOIN pg_class c ON typrelid = c.oid WHERE typname = 'deptest_t';
+
-- doesn't work: grant still exists
DROP USER regression_user1;
DROP OWNED BY regression_user1;
--
2.1.4
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-16 23:15 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-17 17:29 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-17 17:36 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 1 reply; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-17 17:29 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kouhei Kaigai <kaigai@ak.jp.nec.com>
Alvaro Herrera wrote:
> The commit msg says backpatched to 9.1, but given lack of backpatch of
> another bugfix (commit 59367fdf9 for bug #9923) it doesn't actually
> apply. I'd rather backpatch that fix and then apply this one.
So I applied it to 9.5 and master only. If there are more votes for
back-patching both changes to earlier branches, I can do so. I think we
should do that -- in essence, this bug lets you corrupt your catalogs by
dropping a user that still owns objects.
I guess REASSIGN OWNED is not the most popular of commands.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-16 23:15 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-17 17:29 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-17 17:36 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 9+ messages in thread
From: Tom Lane @ 2015-12-17 17:36 UTC (permalink / raw)
To: Alvaro Herrera <alvherre@2ndquadrant.com>; +Cc: cpacejo@clearskydata.com, pgsql-bugs@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Bruce Momjian <bruce@momjian.us>; Kouhei Kaigai <kaigai@ak.jp.nec.com>
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> Alvaro Herrera wrote:
>> The commit msg says backpatched to 9.1, but given lack of backpatch of
>> another bugfix (commit 59367fdf9 for bug #9923) it doesn't actually
>> apply. I'd rather backpatch that fix and then apply this one.
> So I applied it to 9.5 and master only. If there are more votes for
> back-patching both changes to earlier branches, I can do so. I think we
> should do that -- in essence, this bug lets you corrupt your catalogs by
> dropping a user that still owns objects.
I think Bruce did not backpatch 59367fdf9 for fear of
backwards-compatibility complaints, but I tend to agree that that decision
was mistaken. The argument that you can be left with essentially corrupt
catalogs seems pretty strong.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-16 23:15 ` Re: BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type Alvaro Herrera <alvherre@2ndquadrant.com>
@ 2015-12-21 23:27 ` Alvaro Herrera <alvherre@2ndquadrant.com>
1 sibling, 0 replies; 9+ messages in thread
From: Alvaro Herrera @ 2015-12-21 23:27 UTC (permalink / raw)
To: cpacejo@clearskydata.com; +Cc: pgsql-bugs@postgresql.org, Robert Haas <robertmhaas@gmail.com>; Kouhei Kaigai <kaigai@ak.jp.nec.com>
Alvaro Herrera wrote:
> Here's the final patch.
>
> The commit msg says backpatched to 9.1, but given lack of backpatch of
> another bugfix (commit 59367fdf9 for bug #9923) it doesn't actually
> apply. I'd rather backpatch that fix and then apply this one.
Done that way.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2015-12-21 23:27 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-07 14:25 BUG #13666: REASSIGN OWNED BY doesn't affect the relation underlying composite type cpacejo@clearskydata.com
2015-10-07 17:01 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 21:54 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-11 22:30 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-15 23:46 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-16 23:15 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-17 17:29 ` Alvaro Herrera <alvherre@2ndquadrant.com>
2015-12-17 17:36 ` Tom Lane <tgl@sss.pgh.pa.us>
2015-12-21 23:27 ` Alvaro Herrera <alvherre@2ndquadrant.com>
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