aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-08-12 21:20:24 +0000
committerBruce Momjian <bruce@momjian.us>2005-08-12 21:20:24 +0000
commit479a8fd69e7e1a934dbe271aee88d1244ed5ca10 (patch)
tree28dd8a1780e747d7390906e19fcb147544c065ce /src
parentabc8a0a0fecf5c37e683d26fcc9d105d92f5096f (diff)
downloadpostgresql-479a8fd69e7e1a934dbe271aee88d1244ed5ca10.tar.gz
postgresql-479a8fd69e7e1a934dbe271aee88d1244ed5ca10.zip
> Gavin Sherry <swm@linuxworld.com.au> writes:
> > I ran across this yesterday on HEAD: > > > template1=# grant select on foo, foo to swm; > > ERROR: tuple already updated by self > > Seems to fail similarly in every version back to 7.2; probably further, > but that's all I have running at the moment. > > > We could do away with the error by producing a unique list of object names > > -- but that would impose an extra cost on the common case. > > CommandCounterIncrement in the GRANT loop would be easier, likely. > I'm having a hard time getting excited about it though... Yeah, its not that exciting but that error message would throw your average user. I've attached a patch which calls CommandCounterIncrement() in each of the grant loops. Gavin Sherry
Diffstat (limited to 'src')
-rw-r--r--src/backend/catalog/aclchk.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c
index 9e4b58e1298..81dcc904cc2 100644
--- a/src/backend/catalog/aclchk.c
+++ b/src/backend/catalog/aclchk.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.116 2005/07/26 16:38:26 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.117 2005/08/12 21:20:24 momjian Exp $
*
* NOTES
* See acl.h.
@@ -388,6 +388,9 @@ ExecuteGrantStmt_Relation(GrantStmt *stmt)
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}
@@ -565,6 +568,9 @@ ExecuteGrantStmt_Database(GrantStmt *stmt)
heap_endscan(scan);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}
@@ -738,6 +744,9 @@ ExecuteGrantStmt_Function(GrantStmt *stmt)
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}
@@ -920,6 +929,9 @@ ExecuteGrantStmt_Language(GrantStmt *stmt)
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}
@@ -1093,6 +1105,9 @@ ExecuteGrantStmt_Namespace(GrantStmt *stmt)
pfree(new_acl);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}
@@ -1269,6 +1284,9 @@ ExecuteGrantStmt_Tablespace(GrantStmt *stmt)
heap_endscan(scan);
heap_close(relation, RowExclusiveLock);
+
+ /* prevent error when processing duplicate objects */
+ CommandCounterIncrement();
}
}