Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit479a8fd

Browse files
committed
> 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 youraverage user.I've attached a patch which calls CommandCounterIncrement() in each of thegrant loops.Gavin Sherry
1 parentabc8a0a commit479a8fd

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

‎src/backend/catalog/aclchk.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.116 2005/07/26 16:38:26 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/aclchk.c,v 1.117 2005/08/12 21:20:24 momjian Exp $
1212
*
1313
* NOTES
1414
* See acl.h.
@@ -388,6 +388,9 @@ ExecuteGrantStmt_Relation(GrantStmt *stmt)
388388
pfree(new_acl);
389389

390390
heap_close(relation,RowExclusiveLock);
391+
392+
/* prevent error when processing duplicate objects */
393+
CommandCounterIncrement();
391394
}
392395
}
393396

@@ -565,6 +568,9 @@ ExecuteGrantStmt_Database(GrantStmt *stmt)
565568
heap_endscan(scan);
566569

567570
heap_close(relation,RowExclusiveLock);
571+
572+
/* prevent error when processing duplicate objects */
573+
CommandCounterIncrement();
568574
}
569575
}
570576

@@ -738,6 +744,9 @@ ExecuteGrantStmt_Function(GrantStmt *stmt)
738744
pfree(new_acl);
739745

740746
heap_close(relation,RowExclusiveLock);
747+
748+
/* prevent error when processing duplicate objects */
749+
CommandCounterIncrement();
741750
}
742751
}
743752

@@ -920,6 +929,9 @@ ExecuteGrantStmt_Language(GrantStmt *stmt)
920929
pfree(new_acl);
921930

922931
heap_close(relation,RowExclusiveLock);
932+
933+
/* prevent error when processing duplicate objects */
934+
CommandCounterIncrement();
923935
}
924936
}
925937

@@ -1093,6 +1105,9 @@ ExecuteGrantStmt_Namespace(GrantStmt *stmt)
10931105
pfree(new_acl);
10941106

10951107
heap_close(relation,RowExclusiveLock);
1108+
1109+
/* prevent error when processing duplicate objects */
1110+
CommandCounterIncrement();
10961111
}
10971112
}
10981113

@@ -1269,6 +1284,9 @@ ExecuteGrantStmt_Tablespace(GrantStmt *stmt)
12691284

12701285
heap_endscan(scan);
12711286
heap_close(relation,RowExclusiveLock);
1287+
1288+
/* prevent error when processing duplicate objects */
1289+
CommandCounterIncrement();
12721290
}
12731291
}
12741292

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp